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