forked from mrwyndham/fastpocket
1 line
4.4 KiB
JavaScript
1 line
4.4 KiB
JavaScript
"use strict";(self.webpackChunkdoc=self.webpackChunkdoc||[]).push([[976],{1512:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>a,toc:()=>d});var s=n(4848),r=n(8453);const o={sidebar_position:1,slug:"/"},i="Tutorial Intro",a={id:"intro",title:"Tutorial Intro",description:"Let's discover Docusaurus in less than 5 minutes.",source:"@site/docs/intro.md",sourceDirName:".",slug:"/",permalink:"/docs/",draft:!1,unlisted:!1,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,slug:"/"},sidebar:"tutorialSidebar",next:{title:"Tutorial - Basics",permalink:"/docs/category/tutorial---basics"}},l={},d=[{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 c(e){const t={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)(t.h1,{id:"tutorial-intro",children:"Tutorial Intro"}),"\n",(0,s.jsxs)(t.p,{children:["Let's discover ",(0,s.jsx)(t.strong,{children:"Docusaurus in less than 5 minutes"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,s.jsxs)(t.p,{children:["Get started by ",(0,s.jsx)(t.strong,{children:"creating a new site"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["Or ",(0,s.jsx)(t.strong,{children:"try Docusaurus immediately"})," with ",(0,s.jsx)(t.strong,{children:(0,s.jsx)(t.a,{href:"https://docusaurus.new",children:"docusaurus.new"})}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"what-youll-need",children:"What you'll need"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://nodejs.org/en/download/",children:"Node.js"})," version 18.0 or above:","\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"When installing Node.js, you are recommended to check all checkboxes related to dependencies."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"generate-a-new-site",children:"Generate a new site"}),"\n",(0,s.jsxs)(t.p,{children:["Generate a new Docusaurus site using the ",(0,s.jsx)(t.strong,{children:"classic template"}),"."]}),"\n",(0,s.jsx)(t.p,{children:"The classic template will automatically be added to your project after you run the command:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"npm init docusaurus@latest my-website classic\n"})}),"\n",(0,s.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,s.jsx)(t.p,{children:"The command also installs all necessary dependencies you need to run Docusaurus."}),"\n",(0,s.jsx)(t.h2,{id:"start-your-site",children:"Start your site"}),"\n",(0,s.jsx)(t.p,{children:"Run the development server:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"cd my-website\nnpm run start\n"})}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.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,s.jsxs)(t.p,{children:["The ",(0,s.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,s.jsx)(t.a,{href:"http://localhost:3000/",children:"http://localhost:3000/"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["Open ",(0,s.jsx)(t.code,{children:"docs/intro.md"})," (this page) and edit some lines: the site ",(0,s.jsx)(t.strong,{children:"reloads automatically"})," and displays your changes."]})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.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)}}}]); |