docusaurus/assets/js/7ada4fa6.3e533b26.js
2024-12-26 14:46:55 +00:00

1 line
No EOL
22 KiB
JavaScript

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["11773"],{63199:function(e,n,s){s.d(n,{Z:function(){return r}});let r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAT3UlEQVR42u1dCVQVV5pWXNt2N0czykl33KImZ7IgKgqIghq3KCDK+qowCek2c2K0Mx3idBxakzYxJnZiq3Gf6Bg7UdN2R51MxnTSia3gew9Rwccm7oqiiIK4sPxTt1hEHo9XvPVW1fed852Dr+67UNb/1f3/+9/731atAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO8i2CxGjDUJXzMGmcSZnmoHAF7B6GMJvYPNwq5gk1AmMS/YJMbaahtkNsRLbeghmoU4d7cDAO+NCEbhQCMjrZbe5q81bhdyVOwuXbtqZdDSZ+yau9oBgNcgGeIvmzDQJkUy1ix8ZKMtsWvuagcAXsNYs/iyLSNlIgk2GebLQjKJQ6R/32+mbcWYI8KTrm6HJwR4170yCV80Y6T1I4kklH122lFNG9e2wxMC3Ao/U1KnQLPgF2SK/xeri5TiIxlikX1DBXVANpoXSy/DzGCjYfdYs2FRiFkcxWxEu/GF0RAm3fT1Bv8JJyV+LLlV08ccnNuFCQeGAdrheWkkXxaSGueruZFDurlrzfn4QSbDGRgAqJD3JK4NMcU8oo3RIz1hOB4q6AZeCzKK0aoXCIs58DBBt9Esfip5Ke3UPkN1Eg8TdB8N+5grr+JRxPAJHiLoTgaZhf97MiuqvVqTgNPxEEEPcK0qBTIyNa6rnWw1CLooJjHMUZc6KMWnNs9xDg8Q9ACLQtMMvbhfeFi7tuoLZMhBz1NczaUw2H4OFizhAYFe5l0uM+61m53wgMAWM+C7aBr425Ey2c8umPpdxmO+oxQPWz8cvnOmTGf7Gf1DDHXs25lYxMrIfmafOdnvOe4WONZsk4XhaD7nkJpA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6il8euFErxcWkROD9TUqdgk2EfjJOf3IgnRfLepViqrOY37mCbtKbmKhLH1pDvU9q6pVIi29SOmS19zWxNqC3MUM25W6Vg5KhmhRlaUavWHjgoxzAHs1scBe4ZclUOl4sjJt9AxrIoboVRUhmuNCA/F2ZJnOTRs0BC0wy9gk3iamyr5ad2lquCd1alZM2VGG6PNGBJQJbnCM+ze7+sSslKr56RPj7D0K92WQrWbnEiFLYsxZG1W2zEYMszeC0herUiQv77FGTIz7EDcRSVEPUYKMUnyGgYIY0qyVIAuVN6WMdrdyZiuYqXgvixRwX5KOjxmTWLHdnORLZchfnrEdLb9+XTCZKLEiv78GfvRXA0QsykmxXhlF8eST8UR9G6i9H0q7x4Cm10H2HZQoUkhmsSj0/IFnZOyBFeDctNGNoKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsI3/BxVeQNnL1kBuAAAAAElFTkSuQmCC"},10328:function(e,n,s){s.r(n),s.d(n,{metadata:()=>r,contentTitle:()=>d,default:()=>h,assets:()=>l,toc:()=>c,frontMatter:()=>i});var r=JSON.parse('{"id":"guides/markdown-features/introduction","title":"Markdown Features","description":"Docusaurus uses MDX. Find out more about Docusaurus-specific features when writing Markdown.","source":"@site/docs/guides/markdown-features/markdown-features-intro.mdx","sourceDirName":"guides/markdown-features","slug":"/markdown-features","permalink":"/docs/markdown-features","draft":false,"unlisted":false,"editUrl":"https://github.com/facebook/docusaurus/edit/main/website/docs/guides/markdown-features/markdown-features-intro.mdx","tags":[],"version":"current","lastUpdatedBy":"S\xe9bastien Lorber","lastUpdatedAt":1735224247000,"frontMatter":{"id":"introduction","description":"Docusaurus uses MDX. Find out more about Docusaurus-specific features when writing Markdown.","slug":"/markdown-features"},"sidebar":"docs","previous":{"title":"Blog","permalink":"/docs/blog"},"next":{"title":"MDX and React","permalink":"/docs/markdown-features/react"}}'),t=s("85893"),o=s("80980"),a=s("11678");let i={id:"introduction",description:"Docusaurus uses MDX. Find out more about Docusaurus-specific features when writing Markdown.",slug:"/markdown-features"},d="Markdown Features",l={},c=[{value:"MDX vs. CommonMark",id:"mdx-vs-commonmark",level:2},{value:"Standard features",id:"standard-features",level:2},{value:"Front matter",id:"front-matter",level:2},{value:"Quotes",id:"quotes",level:2},{value:"Details",id:"details",level:2}];function u(e){let n={a:"a",admonition:"admonition",blockquote:"blockquote",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.a)(),...e.components},{Details:r}=n;return!r&&function(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"markdown-features",children:"Markdown Features"})}),"\n","\n",(0,t.jsxs)(n.p,{children:["Docusaurus uses ",(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.a,{href:"https://commonmark.org/",children:"Markdown"})})," as its main content authoring format."]}),"\n",(0,t.jsx)(n.admonition,{title:"Learn Markdown",type:"tip",children:(0,t.jsxs)(n.p,{children:["You can ",(0,t.jsx)(n.a,{href:"https://commonmark.org/help/",children:"learn Markdown in 10 minutes"}),"."]})}),"\n",(0,t.jsxs)(n.p,{children:["Docusaurus uses modern tooling to help you create ",(0,t.jsx)(n.strong,{children:"interactive documentation"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.a,{href:"https://mdxjs.com/",children:"MDX"})})," compiler transforms ",(0,t.jsx)(n.strong,{children:"Markdown files to React components"}),", and allows you to use JSX in your Markdown content. This enables you to easily interleave React components within your content, and create delightful learning experiences."]}),"\n",(0,t.jsxs)(n.admonition,{title:"Use the MDX Playground",type:"tip",children:[(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.a,{href:"https://mdxjs.com/playground/",children:"MDX playground"})})," is your new best friend!"]}),(0,t.jsx)(n.p,{children:"It is a very helpful debugging tool that shows how the MDX compiler transforms Markdown to React."}),(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Options"}),": select the right format (MDX or CommonMark) and the following plugins Docusaurus uses: ",(0,t.jsx)(n.code,{children:"remark-gfm"}),", ",(0,t.jsx)(n.code,{children:"remark-directive"}),", ",(0,t.jsx)(n.code,{children:"rehype-raw"}),"."]})]}),"\n",(0,t.jsx)(n.h2,{id:"mdx-vs-commonmark",children:"MDX vs. CommonMark"}),"\n",(0,t.jsxs)(n.p,{children:["Docusaurus compiles both ",(0,t.jsx)(n.code,{children:".md"})," and ",(0,t.jsx)(n.code,{children:".mdx"})," files to React components using the MDX compiler, but ",(0,t.jsx)(n.strong,{children:"the syntax can be interpreted differently"})," depending on your settings."]}),"\n",(0,t.jsxs)(n.p,{children:["The MDX compiler supports ",(0,t.jsx)(n.a,{href:"https://mdxjs.com/packages/mdx/#optionsformat",children:"2 formats"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.a,{href:"https://mdxjs.com/docs/what-is-mdx/",children:"MDX format"}),": a powerful parser allowing the usage of JSX"]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.a,{href:"https://commonmark.org/",children:"CommonMark format"}),": a standard-compliant Markdown parser that does not allow the usage of JSX"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["By default, ",(0,t.jsx)(n.strong,{children:"Docusaurus v3 uses the MDX format for all files"})," (including ",(0,t.jsx)(n.code,{children:".md"})," files) for historical reasons."]}),"\n",(0,t.jsxs)(n.p,{children:["It is possible to ",(0,t.jsx)(n.strong,{children:"opt-in for CommonMark"})," using the ",(0,t.jsx)(n.a,{href:"/docs/api/docusaurus-config#markdown",children:(0,t.jsx)(n.code,{children:"siteConfig.markdown.format"})})," setting or the ",(0,t.jsx)(n.code,{children:"mdx.format: md"})," front matter."]}),"\n",(0,t.jsxs)(n.admonition,{title:"how to use CommonMark",type:"tip",children:[(0,t.jsxs)(n.p,{children:["If you plan to use CommonMark, we recommend the ",(0,t.jsx)(n.a,{href:"/docs/api/docusaurus-config#markdown",children:(0,t.jsx)(n.code,{children:"siteConfig.markdown.format: 'detect'"})})," setting. The appropriate format will be selected automatically, based on file extensions:"]}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:".md"})," files will use the CommonMark format"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:".mdx"})," files will use the MDX format"]}),"\n"]})]}),"\n",(0,t.jsx)(n.admonition,{title:"Experimental CommonMark support",type:"danger",children:(0,t.jsxs)(n.p,{children:["The CommonMark support is ",(0,t.jsx)(n.strong,{children:"experimental"})," and currently has a few ",(0,t.jsx)(n.a,{href:"https://github.com/facebook/docusaurus/issues/9092",children:"limitations"}),"."]})}),"\n",(0,t.jsx)(n.h2,{id:"standard-features",children:"Standard features"}),"\n",(0,t.jsx)(n.p,{children:"Markdown is a syntax that enables you to write formatted content in a readable syntax."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-md",children:"### My Doc Section\n\nHello world message with some **bold** text, some _italic_ text, and a [link](/)\n\n![img alt](/img/docusaurus.png)\n"})}),"\n",(0,t.jsxs)(a.Z,{children:[(0,t.jsx)("h3",{children:"My Doc Section"}),(0,t.jsxs)(n.p,{children:["Hello world message with some ",(0,t.jsx)(n.strong,{children:"bold"})," text, some ",(0,t.jsx)(n.em,{children:"italic"})," text and a ",(0,t.jsx)(n.a,{href:"/",children:"link"})]}),(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"img alt",src:s(63199).Z+"",width:"200",height:"200"})})]}),"\n",(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:"Markdown is declarative"}),(0,t.jsxs)(n.p,{children:["Some may assume a 1-1 correlation between Markdown and HTML, e.g., ",(0,t.jsx)(n.code,{children:"![Preview](/img/docusaurus.png)"})," will always become ",(0,t.jsx)(n.code,{children:'<img src="/img/docusaurus.png" alt="Preview" />'}),", as-is. However, ",(0,t.jsx)(n.em,{children:"that is not the case"}),"."]}),(0,t.jsxs)(n.p,{children:["The Markdown syntax ",(0,t.jsx)(n.code,{children:"![message](url)"})," only declaratively tells Docusaurus that an image needs to be inserted here, but we may do other things like transforming a ",(0,t.jsx)(n.a,{href:"/docs/markdown-features/assets#images",children:"file path to URL path"}),", so the generated markup may differ from the output of other Markdown renderers, or a na\xefve hand-transcription to the equivalent JSX/HTML code."]}),(0,t.jsxs)(n.p,{children:["In general, you should only assume the ",(0,t.jsx)(n.em,{children:"semantics"})," of the markup (",(0,t.jsx)(n.code,{children:"```"})," fences become ",(0,t.jsx)(n.a,{href:"/docs/markdown-features/code-blocks",children:"code blocks"}),"; ",(0,t.jsx)(n.code,{children:">"})," becomes ",(0,t.jsx)(n.a,{href:"#quotes",children:"quotes"}),", etc.), but not the actual compiled output."]})]}),"\n",(0,t.jsx)(n.h2,{id:"front-matter",children:"Front matter"}),"\n",(0,t.jsx)(n.p,{children:"Front matter is used to add metadata to your Markdown file. All content plugins have their own front matter schema, and use the front matter to enrich the default metadata inferred from the content or other configuration."}),"\n",(0,t.jsxs)(n.p,{children:["Front matter is provided at the very top of the file, enclosed by three dashes ",(0,t.jsx)(n.code,{children:"---"}),". The content is parsed as ",(0,t.jsx)(n.a,{href:"https://yaml.org/spec/1.2.2/",children:"YAML"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-md",children:"---\ntitle: My Doc Title\nmore_data:\n - Can be provided\n - as: objects\n or: arrays\n---\n"})}),"\n",(0,t.jsxs)(n.admonition,{type:"info",children:[(0,t.jsx)(n.p,{children:"The API documentation of each official plugin lists the supported attributes:"}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/api/plugins/@docusaurus/plugin-content-docs#markdown-front-matter",children:"Docs front matter"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/api/plugins/@docusaurus/plugin-content-blog#markdown-front-matter",children:"Blog front matter"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/api/plugins/@docusaurus/plugin-content-pages#markdown-front-matter",children:"Pages front matter"})}),"\n"]})]}),"\n",(0,t.jsxs)(n.admonition,{title:"enhance your front matter",type:"tip",children:[(0,t.jsxs)(n.p,{children:["Use the ",(0,t.jsxs)(n.a,{href:"/docs/api/docusaurus-config#markdown",children:["Markdown config ",(0,t.jsx)(n.code,{children:"parseFrontMatter"})," function"]})," to provide your own front matter parser, or to enhance the default parser."]}),(0,t.jsx)(n.p,{children:"It is possible to reuse the default parser to wrap it with your own custom proprietary logic. This makes it possible to implement convenient front matter transformations, shortcuts, or to integrate with external systems using front matter that Docusaurus plugins do not support."}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-js",metastring:'title="docusaurus.config.js"',children:"export default {\n markdown: {\n // highlight-start\n parseFrontMatter: async (params) => {\n // Reuse the default parser\n const result = await params.defaultParseFrontMatter(params);\n\n // Process front matter description placeholders\n result.frontMatter.description =\n result.frontMatter.description?.replaceAll('{{MY_VAR}}', 'MY_VALUE');\n\n // Create your own front matter shortcut\n if (result.frontMatter.i_do_not_want_docs_pagination) {\n result.frontMatter.pagination_prev = null;\n result.frontMatter.pagination_next = null;\n }\n\n // Rename an unsupported front matter coming from another system\n if (result.frontMatter.cms_seo_summary) {\n result.frontMatter.description = result.frontMatter.cms_seo_summary;\n delete result.frontMatter.cms_seo_summary;\n }\n\n return result;\n },\n // highlight-end\n },\n};\n"})})]}),"\n",(0,t.jsx)(n.h2,{id:"quotes",children:"Quotes"}),"\n",(0,t.jsx)(n.p,{children:"Markdown quotes are beautifully styled:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-md",children:"> Easy to maintain open source documentation websites.\n>\n> \u2014 Docusaurus\n"})}),"\n",(0,t.jsx)(a.Z,{children:(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsx)(n.p,{children:"Easy to maintain open source documentation websites."}),"\n",(0,t.jsx)(n.p,{children:"\u2014 Docusaurus"}),"\n"]})}),"\n",(0,t.jsx)(n.h2,{id:"details",children:"Details"}),"\n",(0,t.jsxs)(n.p,{children:["Markdown can embed HTML elements, and ",(0,t.jsx)(n.a,{href:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details",children:(0,t.jsx)(n.code,{children:"details"})})," HTML elements are beautifully styled:"]}),"\n","\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-md",children:'### Details element example\n\n<details>\n <summary>Toggle me!</summary>\n\n This is the detailed content\n\n ```js\n console.log("Markdown features including the code block are available");\n ```\n\n You can use Markdown here including **bold** and _italic_ text, and [inline link](https://docusaurus.io)\n <details>\n <summary>Nested toggle! Some surprise inside...</summary>\n\n \uD83D\uDE32\uD83D\uDE32\uD83D\uDE32\uD83D\uDE32\uD83D\uDE32\n </details>\n</details>\n'})}),"\n",(0,t.jsxs)(a.Z,{children:[(0,t.jsx)("h3",{children:"Details element example"}),(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:"Toggle me!"}),(0,t.jsx)(n.p,{children:"This is the detailed content"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-js",children:'console.log("Markdown features including the code block are available");\n'})}),(0,t.jsxs)(n.p,{children:["You can use Markdown here including ",(0,t.jsx)(n.strong,{children:"bold"})," and ",(0,t.jsx)(n.em,{children:"italic"})," text, and ",(0,t.jsx)(n.a,{href:"https://docusaurus.io",children:"inline link"})]}),(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:"Nested toggle! Some surprise inside..."}),(0,t.jsx)(n.p,{children:"\uD83D\uDE32\uD83D\uDE32\uD83D\uDE32\uD83D\uDE32\uD83D\uDE32"})]})]})]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["You may want to keep your ",(0,t.jsx)(n.code,{children:"<summary>"})," on a single line. Keep in mind that ",(0,t.jsxs)(n.a,{href:"https://mdxjs.com/migrating/v2/#jsx",children:["MDX creates extra HTML ",(0,t.jsx)(n.code,{children:"<p>"})," paragraphs for line breaks."]}),". When in doubt, use the ",(0,t.jsx)(n.a,{href:"https://mdxjs.com/playground/",children:"MDX playground"})," to troubleshoot ",(0,t.jsx)(n.code,{children:"<details>"})," rendering problems."]})})]})}function h(e={}){let{wrapper:n}={...(0,o.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(u,{...e})}):u(e)}},11678:function(e,n,s){s.d(n,{Z:()=>m});var r=s("85893");s("67294");var t=s("90496");let o="browserWindow_my1Q",a="browserWindowHeader_jXSR",i="buttons_uHc7",d="browserWindowAddressBar_Pd8y",l="dot_giz1",c="browserWindowMenuIcon_Vhuh",u="bar_rrRL",h="browserWindowBody_Idgs";function m(e){let{children:n,minHeight:s,url:m="http://localhost:3000",style:p,bodyStyle:x}=e;return(0,r.jsxs)("div",{className:o,style:{...p,minHeight:s},children:[(0,r.jsxs)("div",{className:a,children:[(0,r.jsxs)("div",{className:i,children:[(0,r.jsx)("span",{className:l,style:{background:"#f25f58"}}),(0,r.jsx)("span",{className:l,style:{background:"#fbbe3c"}}),(0,r.jsx)("span",{className:l,style:{background:"#58cb42"}})]}),(0,r.jsx)("div",{className:(0,t.Z)(d,"text--truncate"),children:m}),(0,r.jsx)("div",{className:c,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:u}),(0,r.jsx)("span",{className:u}),(0,r.jsx)("span",{className:u})]})})]}),(0,r.jsx)("div",{className:h,style:x,children:n})]})}},80980:function(e,n,s){s.d(n,{Z:function(){return i},a:function(){return a}});var r=s(67294);let t={},o=r.createContext(t);function a(e){let n=r.useContext(o);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]);