"use strict";(self.webpackChunkdocuments=self.webpackChunkdocuments||[]).push([[3439],{6509:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>a,toc:()=>l});var s=t(5893),o=t(1151);const r={sidebar_position:2},i="Create a Document",a={id:"gian-tou/create-a-document",title:"Create a Document",description:"Documents are groups of pages connected through:",source:"@site/docs/gian-tou/create-a-document.md",sourceDirName:"gian-tou",slug:"/gian-tou/create-a-document",permalink:"/docs/gian-tou/create-a-document",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"giantouSidebar",previous:{title:"Create a Page",permalink:"/docs/gian-tou/create-a-page"},next:{title:"Create a Blog Post",permalink:"/docs/gian-tou/create-a-blog-post"}},c={},l=[{value:"Create your first Doc",id:"create-your-first-doc",level:2},{value:"Configure the Sidebar",id:"configure-the-sidebar",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"create-a-document",children:"Create a Document"}),"\n",(0,s.jsxs)(n.p,{children:["Documents are ",(0,s.jsx)(n.strong,{children:"groups of pages"})," connected through:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["a ",(0,s.jsx)(n.strong,{children:"sidebar"})]}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"previous/next navigation"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"versioning"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"create-your-first-doc",children:"Create your first Doc"}),"\n",(0,s.jsxs)(n.p,{children:["Create a Markdown file at ",(0,s.jsx)(n.code,{children:"docs/hello.md"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-md",metastring:'title="docs/hello.md"',children:"# Hello\n\nThis is my **first Docusaurus document**!\n"})}),"\n",(0,s.jsxs)(n.p,{children:["A new document is now available at ",(0,s.jsx)(n.a,{href:"http://localhost:3000/docs/hello",children:"http://localhost:3000/docs/hello"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"configure-the-sidebar",children:"Configure the Sidebar"}),"\n",(0,s.jsxs)(n.p,{children:["Docusaurus automatically ",(0,s.jsx)(n.strong,{children:"creates a sidebar"})," from the ",(0,s.jsx)(n.code,{children:"docs"})," folder."]}),"\n",(0,s.jsx)(n.p,{children:"Add metadata to customize the sidebar label and position:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-md",metastring:'title="docs/hello.md" {1-4}',children:"---\nsidebar_label: 'Hi!'\nsidebar_position: 3\n---\n\n# Hello\n\nThis is my **first Docusaurus document**!\n"})}),"\n",(0,s.jsxs)(n.p,{children:["It is also possible to create your sidebar explicitly in ",(0,s.jsx)(n.code,{children:"sidebars.js"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'title="sidebars.js"',children:"export default {\n tutorialSidebar: [\n 'intro',\n // highlight-next-line\n 'hello',\n {\n type: 'category',\n label: 'Tutorial',\n items: ['tutorial-basics/create-a-document'],\n },\n ],\n};\n"})})]})}function u(e={}){const{wrapper:n}={...(0,o.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},1151:(e,n,t)=>{t.d(n,{Z:()=>a,a:()=>i});var s=t(7294);const o={},r=s.createContext(o);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]);