Files
snigdhaos-devdocs/assets/js/1e4232ab.39532c3c.js

1 line
4.0 KiB
JavaScript

"use strict";(self.webpackChunkdev_contrib=self.webpackChunkdev_contrib||[]).push([[1953],{6235:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"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":"/DevContrib/docs/tutorial-basics/create-a-document","draft":false,"unlisted":false,"editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/tutorial-basics/create-a-document.md","tags":[],"version":"current","sidebarPosition":2,"frontMatter":{"sidebar_position":2},"sidebar":"tutorialSidebar","previous":{"title":"Create a Page","permalink":"/DevContrib/docs/tutorial-basics/create-a-page"},"next":{"title":"Create a Blog Post","permalink":"/DevContrib/docs/tutorial-basics/create-a-blog-post"}}');var r=n(6070),o=n(6599);const a={sidebar_position:2},i="Create a Document",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",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:"create-a-document",children:"Create a Document"})}),"\n",(0,r.jsxs)(t.p,{children:["Documents are ",(0,r.jsx)(t.strong,{children:"groups of pages"})," connected through:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["a ",(0,r.jsx)(t.strong,{children:"sidebar"})]}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.strong,{children:"previous/next navigation"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.strong,{children:"versioning"})}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"create-your-first-doc",children:"Create your first Doc"}),"\n",(0,r.jsxs)(t.p,{children:["Create a Markdown file at ",(0,r.jsx)(t.code,{children:"docs/hello.md"}),":"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-md",metastring:'title="docs/hello.md"',children:"# Hello\n\nThis is my **first Docusaurus document**!\n"})}),"\n",(0,r.jsxs)(t.p,{children:["A new document is now available at ",(0,r.jsx)(t.a,{href:"http://localhost:3000/docs/hello",children:"http://localhost:3000/docs/hello"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"configure-the-sidebar",children:"Configure the Sidebar"}),"\n",(0,r.jsxs)(t.p,{children:["Docusaurus automatically ",(0,r.jsx)(t.strong,{children:"creates a sidebar"})," from the ",(0,r.jsx)(t.code,{children:"docs"})," folder."]}),"\n",(0,r.jsx)(t.p,{children:"Add metadata to customize the sidebar label and position:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.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,r.jsxs)(t.p,{children:["It is also possible to create your sidebar explicitly in ",(0,r.jsx)(t.code,{children:"sidebars.js"}),":"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.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,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},6599:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>i});var s=n(758);const r={},o=s.createContext(r);function a(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]);