mirror of
https://github.com/Snigdha-OS/documentation.git
synced 2025-09-06 19:15:12 +02:00
1 line
3.9 KiB
JavaScript
1 line
3.9 KiB
JavaScript
"use strict";(self.webpackChunkdocuments=self.webpackChunkdocuments||[]).push([[1953],{23:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var s=n(4848),r=n(8453);const o={sidebar_position:2},i="Create a Document",a={id:"tutorial-basics/create-a-document",title:"Create a Document",description:"Documents are groups of pages connected through:",source:"@site/docs/tutorial-basics/create-a-document.md",sourceDirName:"tutorial-basics",slug:"/tutorial-basics/create-a-document",permalink:"/documentation/tutorial-basics/create-a-document",draft:!1,unlisted:!1,editUrl:"https://github.com/Snigdha-OS/documentation/tree/master/docs/tutorial-basics/create-a-document.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Create a Page",permalink:"/documentation/tutorial-basics/create-a-page"},next:{title:"Create a Blog Post",permalink:"/documentation/tutorial-basics/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 t={a:"a",code:"code",h1:"h1",h2:"h2",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:"create-a-document",children:"Create a Document"}),"\n",(0,s.jsxs)(t.p,{children:["Documents are ",(0,s.jsx)(t.strong,{children:"groups of pages"})," connected through:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["a ",(0,s.jsx)(t.strong,{children:"sidebar"})]}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.strong,{children:"previous/next navigation"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.strong,{children:"versioning"})}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"create-your-first-doc",children:"Create your first Doc"}),"\n",(0,s.jsxs)(t.p,{children:["Create a Markdown file at ",(0,s.jsx)(t.code,{children:"docs/hello.md"}),":"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-md",metastring:'title="docs/hello.md"',children:"# Hello\n\nThis is my **first Docusaurus document**!\n"})}),"\n",(0,s.jsxs)(t.p,{children:["A new document is now available at ",(0,s.jsx)(t.a,{href:"http://localhost:3000/docs/hello",children:"http://localhost:3000/docs/hello"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"configure-the-sidebar",children:"Configure the Sidebar"}),"\n",(0,s.jsxs)(t.p,{children:["Docusaurus automatically ",(0,s.jsx)(t.strong,{children:"creates a sidebar"})," from the ",(0,s.jsx)(t.code,{children:"docs"})," folder."]}),"\n",(0,s.jsx)(t.p,{children:"Add metadata to customize the sidebar label and position:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.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)(t.p,{children:["It is also possible to create your sidebar explicitly in ",(0,s.jsx)(t.code,{children:"sidebars.js"}),":"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.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:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(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)}}}]); |