Files
documentation/assets/js/c62485b9.fac9905a.js
2024-03-22 16:08:34 +00:00

1 line
4.5 KiB
JavaScript

"use strict";(self.webpackChunkdocuments=self.webpackChunkdocuments||[]).push([[1976],{6655:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>d,toc:()=>c});var s=t(4848),r=t(8453);const o={sidebar_position:1,slug:"/"},i="Introduction",d={id:"introduction/introduction",title:"Introduction",description:"Let's discover Docusaurus in less than 5 minutes.",source:"@site/docs/introduction/introduction.md",sourceDirName:"introduction",slug:"/",permalink:"/documentation/",draft:!1,unlisted:!1,editUrl:"https://github.com/Snigdha-OS/documentation/tree/master/docs/introduction/introduction.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,slug:"/"},sidebar:"tutorialSidebar",previous:{title:"Introduction",permalink:"/documentation/category/introduction"},next:{title:"Before Installation",permalink:"/documentation/category/before-installation"}},a={},c=[{value:"Getting Started",id:"getting-started",level:2},{value:"What you'll need",id:"what-youll-need",level:3},{value:"Generate a new site",id:"generate-a-new-site",level:2},{value:"Start your site",id:"start-your-site",level:2}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"introduction",children:"Introduction"}),"\n",(0,s.jsxs)(n.p,{children:["Let's discover ",(0,s.jsx)(n.strong,{children:"Docusaurus in less than 5 minutes"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,s.jsxs)(n.p,{children:["Get started by ",(0,s.jsx)(n.strong,{children:"creating a new site"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Or ",(0,s.jsx)(n.strong,{children:"try Docusaurus immediately"})," with ",(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.a,{href:"https://docusaurus.new",children:"docusaurus.new"})}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"what-youll-need",children:"What you'll need"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://nodejs.org/en/download/",children:"Node.js"})," version 18.0 or above:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"When installing Node.js, you are recommended to check all checkboxes related to dependencies."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"generate-a-new-site",children:"Generate a new site"}),"\n",(0,s.jsxs)(n.p,{children:["Generate a new Docusaurus site using the ",(0,s.jsx)(n.strong,{children:"classic template"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"The classic template will automatically be added to your project after you run the command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npm init docusaurus@latest my-website classic\n"})}),"\n",(0,s.jsx)(n.p,{children:"You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor."}),"\n",(0,s.jsx)(n.p,{children:"The command also installs all necessary dependencies you need to run Docusaurus."}),"\n",(0,s.jsx)(n.h2,{id:"start-your-site",children:"Start your site"}),"\n",(0,s.jsx)(n.p,{children:"Run the development server:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"cd my-website\nnpm run start\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"cd"})," command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"npm run start"})," command builds your website locally and serves it through a development server, ready for you to view at ",(0,s.jsx)(n.a,{href:"http://localhost:3000/",children:"http://localhost:3000/"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Open ",(0,s.jsx)(n.code,{children:"docs/intro.md"})," (this page) and edit some lines: the site ",(0,s.jsx)(n.strong,{children:"reloads automatically"})," and displays your changes."]}),"\n",(0,s.jsx)(n.p,{children:"Powered by:"})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>d});var s=t(6540);const r={},o=s.createContext(r);function i(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]);