mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-18 03:26:57 +02:00
parent
6b2f57c29c
commit
4546c36b7d
368 changed files with 25613 additions and 1429 deletions
|
@ -12,7 +12,7 @@
|
|||
{"zIndex":100}
|
||||
)
|
||||
});
|
||||
</script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/></head><body class="sideNavVisible doc separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.1.5</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/en/help" target="_self">Help</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class=""><a href="/en/about-slash" target="_self">About /</a></li><li class=""><a href="/blog" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_self">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/docs/es-ES/site-creation">Español</a></li><li><a href="/docs/ro/site-creation">Română</a></li><li><a href="/docs/tr/site-creation">Türkçe</a></li><li><a href="/docs/zh-CN/site-creation">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Translate</a></li></ul></div></li><script>
|
||||
</script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/></head><body class="sideNavVisible doc separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/en"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/en/versions"><h3>1.2.0</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/docs/en/installation" target="_self">Docs</a></li><li class=""><a href="/en/help" target="_self">Help</a></li><li class=""><a href="/en/users" target="_self">Users</a></li><li class=""><a href="/en/about-slash" target="_self">About /</a></li><li class=""><a href="/blog" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_self">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg"/>English</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/docs/es-ES/site-creation">Español</a></li><li><a href="/docs/ro/site-creation">Română</a></li><li><a href="/docs/tr/site-creation">Türkçe</a></li><li><a href="/docs/zh-CN/site-creation">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Translate</a></li></ul></div></li><script>
|
||||
const languagesMenuItem = document.getElementById("languages-menu");
|
||||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||||
languagesMenuItem.addEventListener("click", function(){
|
||||
|
@ -49,30 +49,29 @@
|
|||
<p>After <a href="/docs/en/installation">installation</a> and <a href="/docs/en/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Site Structure</h2>
|
||||
<p>Your site structure looks like the following:</p>
|
||||
<pre><code class="hljs css languages- bash">root-of-repo
|
||||
<pre><code class="hljs css languages- bash">root-directory
|
||||
├── docs
|
||||
├── website
|
||||
│ ├── blog
|
||||
│ ├── core
|
||||
│ │ └── Footer.js
|
||||
│ ├── node_modules
|
||||
│ ├── package.json
|
||||
│ ├── pages
|
||||
│ ├── sidebars.json
|
||||
│ ├── siteConfig.js
|
||||
│ └── static
|
||||
└── website
|
||||
├── blog
|
||||
├── core
|
||||
│ └── Footer.js
|
||||
├── package.json
|
||||
├── pages
|
||||
├── sidebars.json
|
||||
├── siteConfig.js
|
||||
└── static
|
||||
</code></pre>
|
||||
<blockquote>
|
||||
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/en/installation">initialization</a> script.</p>
|
||||
</blockquote>
|
||||
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
|
||||
<p>All of your documentation files should be placed inside the <code>docs</code> directory as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> directory.</p>
|
||||
<blockquote>
|
||||
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
|
||||
</blockquote>
|
||||
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Create Your Basic Site</h2>
|
||||
<p>To create a fully functional site, you only need to do a few steps:</p>
|
||||
<ol>
|
||||
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/en/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
|
||||
<li><p>Add your documentation to the <code>/docs</code> directory as <code>.md</code> files, ensuring you have the proper <a href="/docs/en/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
|
||||
<pre><code class="hljs css languages- yaml"><span class="hljs-meta">---</span>
|
||||
<span class="hljs-attr">id:</span> <span class="hljs-string">intro</span>
|
||||
<span class="hljs-attr">title:</span> <span class="hljs-string">Getting</span> <span class="hljs-string">Started</span>
|
||||
|
@ -88,7 +87,7 @@
|
|||
<ol start="3">
|
||||
<li>Modify the <code>website/siteConfig.js</code> file to <a href="/docs/en/site-config">configure your site</a>, following the comments included in the <a href="/docs/en/site-config">docs</a> and the <code>website/siteConfig.js</code> to guide you.</li>
|
||||
<li>Create any <a href="/docs/en/custom-pages#customizing-your-site-footer">custom pages</a> and/or <a href="/docs/en/custom-pages#customizing-your-site-footer">customize</a> the <code>website/core/Footer.js</code> file that provides the footer for your site.</li>
|
||||
<li>Place assets, such as images, in the <code>website/static/</code> folder.</li>
|
||||
<li>Place assets, such as images, in the <code>website/static/</code> directory.</li>
|
||||
<li>Run the site to see the results of your changes.</li>
|
||||
</ol>
|
||||
<pre><code class="hljs css languages- bash"><span class="hljs-built_in">cd</span> website
|
||||
|
@ -100,7 +99,7 @@ yarn run start <span class="hljs-comment"># or `npm run start`</span>
|
|||
<p>If you prefer to have your landing page be straight to your documentation, you can do this through a redirect.</p>
|
||||
<ol>
|
||||
<li>Remove the <code>index.js</code> file from the <code>website/pages</code> directory, if it exists.</li>
|
||||
<li>Add a <a href="/docs/en/custom-pages#adding-static-pages">custom static <code>index.html</code> page</a> in the <code>website/static</code> folder with the following contents:</li>
|
||||
<li>Add a <a href="/docs/en/custom-pages#adding-static-pages">custom static <code>index.html</code> page</a> in the <code>website/static</code> directory with the following contents:</li>
|
||||
</ol>
|
||||
<pre><code class="hljs css languages- html"><span class="hljs-meta"><!DOCTYPE HTML></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">"en-US"</span>></span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue