mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 08:49:51 +02:00
parent
46e7d444e4
commit
bdabf15f58
756 changed files with 3330 additions and 2962 deletions
|
@ -128,7 +128,8 @@ MyPage.description = 'Ma description customisée;
|
|||
module.exports = MyPage;
|
||||
</code></pre>
|
||||
<p>Cela va être traduit par une méta-balise de description dans le code HTML généré.</p>
|
||||
<pre><code class="hljs css language-html"><span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">property</span>=<span class="hljs-string">"og:description"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"My Custom Description"</span>/></span><span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"description"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"My Custom Description"</span>/></span>
|
||||
<pre><code class="hljs css language-html"><span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">property</span>=<span class="hljs-string">"og:description"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"My Custom Description"</span> /></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"description"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"My Custom Description"</span> /></span>
|
||||
</code></pre>
|
||||
<h2><a class="anchor" aria-hidden="true" id="page-require-paths"></a><a href="#page-require-paths" 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>Page Require Paths</h2>
|
||||
<p>Docusaurus provides a few useful React components for users to write their own pages, found in the <code>CompLibrary</code> module. Ce module est fourni dans le cadre de Docusaurus en <code>node_modules/docusaurus</code>, donc pour y accéder, les pages dans le répertoire de <code>pages</code> sont temporairement copiés dans <code>node_modules/docusaurus</code> lors du rendu au format HTML statique. As seen in the example files, this means that a user page at <code>pages/en/index.js</code> uses a require path to <code>'../../core/CompLibrary.js'</code> to import the provided components.</p>
|
||||
|
|
|
@ -128,7 +128,8 @@ MyPage.description = 'Ma description customisée;
|
|||
module.exports = MyPage;
|
||||
</code></pre>
|
||||
<p>Cela va être traduit par une méta-balise de description dans le code HTML généré.</p>
|
||||
<pre><code class="hljs css language-html"><span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">property</span>=<span class="hljs-string">"og:description"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"My Custom Description"</span>/></span><span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"description"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"My Custom Description"</span>/></span>
|
||||
<pre><code class="hljs css language-html"><span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">property</span>=<span class="hljs-string">"og:description"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"My Custom Description"</span> /></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"description"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"My Custom Description"</span> /></span>
|
||||
</code></pre>
|
||||
<h2><a class="anchor" aria-hidden="true" id="page-require-paths"></a><a href="#page-require-paths" 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>Page Require Paths</h2>
|
||||
<p>Docusaurus provides a few useful React components for users to write their own pages, found in the <code>CompLibrary</code> module. Ce module est fourni dans le cadre de Docusaurus en <code>node_modules/docusaurus</code>, donc pour y accéder, les pages dans le répertoire de <code>pages</code> sont temporairement copiés dans <code>node_modules/docusaurus</code> lors du rendu au format HTML statique. As seen in the example files, this means that a user page at <code>pages/en/index.js</code> uses a require path to <code>'../../core/CompLibrary.js'</code> to import the provided components.</p>
|
||||
|
|
|
@ -94,6 +94,7 @@
|
|||
<span class="hljs-attr">titre :</span> <span class="hljs-string">Mon</span> <span class="hljs-string">Document</span>
|
||||
<span class="hljs-attr">sidebar_label :</span> <span class="hljs-string">Document</span>
|
||||
<span class="hljs-meta">---</span>
|
||||
|
||||
</code></pre>
|
||||
<p>Versioned documents have their ids altered to include the version number when they get copied. The new <code>id</code> is <code>version-${version}-${id}</code> where <code>${version}</code> is the version number of that document and <code>${id}</code> is the original <code>id</code>. Additionally, versioned documents get an added <code>original_id</code> field with the original document id.</p>
|
||||
<p>Par exemple :</p>
|
||||
|
@ -103,6 +104,7 @@
|
|||
<span class="hljs-attr">sidebar_label:</span> <span class="hljs-string">Document</span>
|
||||
<span class="hljs-attr">original_id:</span> <span class="hljs-string">doc1</span>
|
||||
<span class="hljs-meta">---</span>
|
||||
|
||||
</code></pre>
|
||||
<p><code>custom_edit_url</code>: L'url pour éditer le document. Si ce champ n'est pas présent, l'url du document va retournera <code>editUrl</code> depuis les champs optionnel de <code>siteConfig.js</code>. See <a href="/docs/fr/1.13.0/site-config">siteConfig.js</a> docs for more information.</p>
|
||||
<p>Par exemple :</p>
|
||||
|
@ -111,6 +113,7 @@
|
|||
<span class="hljs-attr">title:</span> <span class="hljs-string">Fonctionnalités</span> <span class="hljs-string">de</span> <span class="hljs-string">Markdown</span>
|
||||
<span class="hljs-attr">custom_edit_url:</span> <span class="hljs-string">https://github.com/facebook/docusaurus/edit/master/docs/api-doc-markdown.md</span>
|
||||
<span class="hljs-meta">---</span>
|
||||
|
||||
</code></pre>
|
||||
<h3><a class="anchor" aria-hidden="true" id="publications-de-blog"></a><a href="#publications-de-blog" 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>Publications de blog</h3>
|
||||
<p>Les articles du blog suivent les entêtes de markdown qui sont encadrées par une ligne <code>---</code> de chaque coté:</p>
|
||||
|
@ -125,6 +128,7 @@
|
|||
<span class="hljs-attr">authorURL:</span> <span class="hljs-string">http://twitter.com/franchementli</span>
|
||||
<span class="hljs-attr">authorFBID:</span> <span class="hljs-number">100002976521003</span>
|
||||
<span class="hljs-meta">---</span>
|
||||
|
||||
</code></pre>
|
||||
<h2><a class="anchor" aria-hidden="true" id="fonctionnalités-supplémentaires"></a><a href="#fonctionnalités-supplémentaires" 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>Fonctionnalités supplémentaires</h2>
|
||||
<p>Docusaurus supports some extra features when writing documentation in markdown.</p>
|
||||
|
|
|
@ -94,6 +94,7 @@
|
|||
<span class="hljs-attr">titre :</span> <span class="hljs-string">Mon</span> <span class="hljs-string">Document</span>
|
||||
<span class="hljs-attr">sidebar_label :</span> <span class="hljs-string">Document</span>
|
||||
<span class="hljs-meta">---</span>
|
||||
|
||||
</code></pre>
|
||||
<p>Versioned documents have their ids altered to include the version number when they get copied. The new <code>id</code> is <code>version-${version}-${id}</code> where <code>${version}</code> is the version number of that document and <code>${id}</code> is the original <code>id</code>. Additionally, versioned documents get an added <code>original_id</code> field with the original document id.</p>
|
||||
<p>Par exemple :</p>
|
||||
|
@ -103,6 +104,7 @@
|
|||
<span class="hljs-attr">sidebar_label:</span> <span class="hljs-string">Document</span>
|
||||
<span class="hljs-attr">original_id:</span> <span class="hljs-string">doc1</span>
|
||||
<span class="hljs-meta">---</span>
|
||||
|
||||
</code></pre>
|
||||
<p><code>custom_edit_url</code>: L'url pour éditer le document. Si ce champ n'est pas présent, l'url du document va retournera <code>editUrl</code> depuis les champs optionnel de <code>siteConfig.js</code>. See <a href="/docs/fr/1.13.0/site-config">siteConfig.js</a> docs for more information.</p>
|
||||
<p>Par exemple :</p>
|
||||
|
@ -111,6 +113,7 @@
|
|||
<span class="hljs-attr">title:</span> <span class="hljs-string">Fonctionnalités</span> <span class="hljs-string">de</span> <span class="hljs-string">Markdown</span>
|
||||
<span class="hljs-attr">custom_edit_url:</span> <span class="hljs-string">https://github.com/facebook/docusaurus/edit/master/docs/api-doc-markdown.md</span>
|
||||
<span class="hljs-meta">---</span>
|
||||
|
||||
</code></pre>
|
||||
<h3><a class="anchor" aria-hidden="true" id="publications-de-blog"></a><a href="#publications-de-blog" 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>Publications de blog</h3>
|
||||
<p>Les articles du blog suivent les entêtes de markdown qui sont encadrées par une ligne <code>---</code> de chaque coté:</p>
|
||||
|
@ -125,6 +128,7 @@
|
|||
<span class="hljs-attr">authorURL:</span> <span class="hljs-string">http://twitter.com/franchementli</span>
|
||||
<span class="hljs-attr">authorFBID:</span> <span class="hljs-number">100002976521003</span>
|
||||
<span class="hljs-meta">---</span>
|
||||
|
||||
</code></pre>
|
||||
<h2><a class="anchor" aria-hidden="true" id="fonctionnalités-supplémentaires"></a><a href="#fonctionnalités-supplémentaires" 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>Fonctionnalités supplémentaires</h2>
|
||||
<p>Docusaurus supports some extra features when writing documentation in markdown.</p>
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
<li><p>Exécutez <code>docker-compose</code> et Compose démarre et exécute toute votre application.</p></li>
|
||||
</ol>
|
||||
<p>Nous incluons un <code>docker-compose.yml</code> de base dans votre projet :</p>
|
||||
<pre><code class="hljs css language-yml"><span class="hljs-attr">version:</span> <span class="hljs-string">"3"</span>
|
||||
<pre><code class="hljs css language-yml"><span class="hljs-attr">version:</span> <span class="hljs-string">'3'</span>
|
||||
|
||||
<span class="hljs-attr">services:</span>
|
||||
<span class="hljs-attr">docusaurus:</span>
|
||||
|
@ -124,7 +124,6 @@
|
|||
<span class="hljs-bullet">-</span> <span class="hljs-string">./website/sidebars.json:/app/website/sidebars.json</span>
|
||||
<span class="hljs-bullet">-</span> <span class="hljs-string">./website/siteConfig.js:/app/website/siteConfig.js</span>
|
||||
<span class="hljs-attr">working_dir:</span> <span class="hljs-string">/app/website</span>
|
||||
|
||||
</code></pre>
|
||||
<p>Pour exécuter un serveur web local avec <code>docker-compose</code>, exécutez <code>docker-compose up</code>.</p>
|
||||
<p>Pour construire des pages HTML statiques, exécutez <code>docker-compose run docusaurus bash -c 'yarn publish-gh-pages'</code></p>
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
<li><p>Exécutez <code>docker-compose</code> et Compose démarre et exécute toute votre application.</p></li>
|
||||
</ol>
|
||||
<p>Nous incluons un <code>docker-compose.yml</code> de base dans votre projet :</p>
|
||||
<pre><code class="hljs css language-yml"><span class="hljs-attr">version:</span> <span class="hljs-string">"3"</span>
|
||||
<pre><code class="hljs css language-yml"><span class="hljs-attr">version:</span> <span class="hljs-string">'3'</span>
|
||||
|
||||
<span class="hljs-attr">services:</span>
|
||||
<span class="hljs-attr">docusaurus:</span>
|
||||
|
@ -124,7 +124,6 @@
|
|||
<span class="hljs-bullet">-</span> <span class="hljs-string">./website/sidebars.json:/app/website/sidebars.json</span>
|
||||
<span class="hljs-bullet">-</span> <span class="hljs-string">./website/siteConfig.js:/app/website/siteConfig.js</span>
|
||||
<span class="hljs-attr">working_dir:</span> <span class="hljs-string">/app/website</span>
|
||||
|
||||
</code></pre>
|
||||
<p>Pour exécuter un serveur web local avec <code>docker-compose</code>, exécutez <code>docker-compose up</code>.</p>
|
||||
<p>Pour construire des pages HTML statiques, exécutez <code>docker-compose run docusaurus bash -c 'yarn publish-gh-pages'</code></p>
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
<p>Vous devez avoir une version de Node >= 8.x et de Yarn >= 1.5.</p>
|
||||
</blockquote></li>
|
||||
<li><p>Créez un projet, si aucun n'existe, et placez votre répertoire courant à la racine du projet.</p>
|
||||
<p>Vous pouvez créer la documentation dans ce dossier. Le répertoire racine peut contenir d'autres fichiers. Le script d'installation de Docusaurus vous créera deux nouveaux répertoires : <code>docs</code> et <code>website</code>.</p>
|
||||
<p>Vous pouvez créer la documentation dans ce dossier. The root directory may contain other files. The Docusaurus installation script will create two new directories: <code>docs</code> and <code>website</code>.</p>
|
||||
<blockquote>
|
||||
<p>Généralement, un projet GitHub existant ou nouvellement créé sera l'emplacement de votre site Docusaurus, mais ce n'est pas obligatoire pour utiliser Docusaurus.</p>
|
||||
</blockquote></li>
|
||||
|
@ -126,11 +126,11 @@
|
|||
└── static
|
||||
</code></pre>
|
||||
<h2><a class="anchor" aria-hidden="true" id="exécution-du-site-web-dexemple"></a><a href="#exécution-du-site-web-dexemple" 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>Exécution du site web d'exemple</h2>
|
||||
<p>Après avoir exécuté le script d'initialisation de Docusaurus, <code>docusaurus-init</code> comme décrit dans la section d'<a href="#installing-docusaurus">Installation</a>, vous devriez avoir un exemple de site web à utiliser comme base. Pour se faire:</p>
|
||||
<p>After running the Docusaurus initialization script, <code>docusaurus-init</code> as described in the <a href="#installing-docusaurus">Installation</a> section, you will have a runnable, example website to use as your site's base. Pour se faire:</p>
|
||||
<ol>
|
||||
<li><p><code>cd website</code></p></li>
|
||||
<li><p>Dans le dossier <code>website</code>, exécutez le serveur web local en utilisant <code>yarn start</code> ou <code>npm start</code>.</p></li>
|
||||
<li><p>Chargez l'exemple à l'adresse <a href="http://localhost:3000">http://localhost:3000</a> s'il ne s'est pas ouvert automatiquement. Si le port 3000 est déjà pris, un autre port sera utilisé. Regardez les messages de la console pour voir lequel.</p>
|
||||
<li><p>From within the <code>website</code> directory, run the local web server using <code>yarn start</code> or <code>npm start</code>.</p></li>
|
||||
<li><p>Load the example site at <a href="http://localhost:3000">http://localhost:3000</a> if it did not already open automatically. Si le port 3000 est déjà pris, un autre port sera utilisé. Regardez les messages de la console pour voir lequel.</p>
|
||||
<p>Vous devrez voir le site d'exemple chargé dans votre navigateur. Il y a également un serveur de LiveReload de lancé et tous les changements effectuées sur la documentation et les fichés placés dans le dossier <code>website</code> causeront une actualisation de la page. Une couleur de thème primaire et secondaire générée aléatoirement sera choisie pour vous.</p></li>
|
||||
</ol>
|
||||
<p><img src="/img/getting-started-preparation-verify.png" alt=""></p>
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
<p>Vous devez avoir une version de Node >= 8.x et de Yarn >= 1.5.</p>
|
||||
</blockquote></li>
|
||||
<li><p>Créez un projet, si aucun n'existe, et placez votre répertoire courant à la racine du projet.</p>
|
||||
<p>Vous pouvez créer la documentation dans ce dossier. Le répertoire racine peut contenir d'autres fichiers. Le script d'installation de Docusaurus vous créera deux nouveaux répertoires : <code>docs</code> et <code>website</code>.</p>
|
||||
<p>Vous pouvez créer la documentation dans ce dossier. The root directory may contain other files. The Docusaurus installation script will create two new directories: <code>docs</code> and <code>website</code>.</p>
|
||||
<blockquote>
|
||||
<p>Généralement, un projet GitHub existant ou nouvellement créé sera l'emplacement de votre site Docusaurus, mais ce n'est pas obligatoire pour utiliser Docusaurus.</p>
|
||||
</blockquote></li>
|
||||
|
@ -126,11 +126,11 @@
|
|||
└── static
|
||||
</code></pre>
|
||||
<h2><a class="anchor" aria-hidden="true" id="exécution-du-site-web-dexemple"></a><a href="#exécution-du-site-web-dexemple" 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>Exécution du site web d'exemple</h2>
|
||||
<p>Après avoir exécuté le script d'initialisation de Docusaurus, <code>docusaurus-init</code> comme décrit dans la section d'<a href="#installing-docusaurus">Installation</a>, vous devriez avoir un exemple de site web à utiliser comme base. Pour se faire:</p>
|
||||
<p>After running the Docusaurus initialization script, <code>docusaurus-init</code> as described in the <a href="#installing-docusaurus">Installation</a> section, you will have a runnable, example website to use as your site's base. Pour se faire:</p>
|
||||
<ol>
|
||||
<li><p><code>cd website</code></p></li>
|
||||
<li><p>Dans le dossier <code>website</code>, exécutez le serveur web local en utilisant <code>yarn start</code> ou <code>npm start</code>.</p></li>
|
||||
<li><p>Chargez l'exemple à l'adresse <a href="http://localhost:3000">http://localhost:3000</a> s'il ne s'est pas ouvert automatiquement. Si le port 3000 est déjà pris, un autre port sera utilisé. Regardez les messages de la console pour voir lequel.</p>
|
||||
<li><p>From within the <code>website</code> directory, run the local web server using <code>yarn start</code> or <code>npm start</code>.</p></li>
|
||||
<li><p>Load the example site at <a href="http://localhost:3000">http://localhost:3000</a> if it did not already open automatically. Si le port 3000 est déjà pris, un autre port sera utilisé. Regardez les messages de la console pour voir lequel.</p>
|
||||
<p>Vous devrez voir le site d'exemple chargé dans votre navigateur. Il y a également un serveur de LiveReload de lancé et tous les changements effectuées sur la documentation et les fichés placés dans le dossier <code>website</code> causeront une actualisation de la page. Une couleur de thème primaire et secondaire générée aléatoirement sera choisie pour vous.</p></li>
|
||||
</ol>
|
||||
<p><img src="/img/getting-started-preparation-verify.png" alt=""></p>
|
||||
|
|
|
@ -313,7 +313,8 @@
|
|||
<ol>
|
||||
<li><p>Créez un nouveau <strong>Service Web</strong> sur Render, et donnez la permission à l'application GitHub de Render d'accéder à votre dépôt Docusaurus.</p></li>
|
||||
<li><p>Select the branch to deploy. La valeur par défaut est <code>master</code>.</p></li>
|
||||
<li><p>Entrez les valeurs suivantes pendant la création.</p>
|
||||
<li><p>Entrez les valeurs suivantes pendant la création.</p></li>
|
||||
</ol>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Champ</th><th>Valeur</th></tr>
|
||||
|
@ -324,16 +325,12 @@
|
|||
<tr><td><strong>Publish Directory</strong></td><td><code>website/build/<projectName></code></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ol>
|
||||
<pre><code class="hljs">`projectName` est la valeur que vous avez définie dans votre `siteConfig.js`.
|
||||
|
||||
```javascript{7}
|
||||
const siteConfig = {
|
||||
// ...
|
||||
projectName: 'your-project-name',
|
||||
// ...
|
||||
```
|
||||
<pre><code class="hljs">`projectName` is the value you defined in your `siteConfig.js`.
|
||||
</code></pre>
|
||||
<pre><code class="hljs css language-javascript{7}"><span class="hljs-keyword">const</span> siteConfig = {
|
||||
<span class="hljs-comment">// ...</span>
|
||||
projectName: <span class="hljs-string">'your-project-name'</span>,
|
||||
<span class="hljs-comment">// ...</span>
|
||||
</code></pre>
|
||||
<p>C'est tout ! Votre application sera directement sur votre URL Render dès que la version sera terminée.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="publishing-to-github-enterprise"></a><a href="#publishing-to-github-enterprise" 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>Publishing to GitHub Enterprise</h3>
|
||||
|
|
|
@ -313,7 +313,8 @@
|
|||
<ol>
|
||||
<li><p>Créez un nouveau <strong>Service Web</strong> sur Render, et donnez la permission à l'application GitHub de Render d'accéder à votre dépôt Docusaurus.</p></li>
|
||||
<li><p>Select the branch to deploy. La valeur par défaut est <code>master</code>.</p></li>
|
||||
<li><p>Entrez les valeurs suivantes pendant la création.</p>
|
||||
<li><p>Entrez les valeurs suivantes pendant la création.</p></li>
|
||||
</ol>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Champ</th><th>Valeur</th></tr>
|
||||
|
@ -324,16 +325,12 @@
|
|||
<tr><td><strong>Publish Directory</strong></td><td><code>website/build/<projectName></code></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ol>
|
||||
<pre><code class="hljs">`projectName` est la valeur que vous avez définie dans votre `siteConfig.js`.
|
||||
|
||||
```javascript{7}
|
||||
const siteConfig = {
|
||||
// ...
|
||||
projectName: 'your-project-name',
|
||||
// ...
|
||||
```
|
||||
<pre><code class="hljs">`projectName` is the value you defined in your `siteConfig.js`.
|
||||
</code></pre>
|
||||
<pre><code class="hljs css language-javascript{7}"><span class="hljs-keyword">const</span> siteConfig = {
|
||||
<span class="hljs-comment">// ...</span>
|
||||
projectName: <span class="hljs-string">'your-project-name'</span>,
|
||||
<span class="hljs-comment">// ...</span>
|
||||
</code></pre>
|
||||
<p>C'est tout ! Votre application sera directement sur votre URL Render dès que la version sera terminée.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="publishing-to-github-enterprise"></a><a href="#publishing-to-github-enterprise" 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>Publishing to GitHub Enterprise</h3>
|
||||
|
|
|
@ -111,7 +111,6 @@
|
|||
<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>
|
||||
<span class="hljs-meta">---</span>
|
||||
|
||||
<span class="hljs-string">My</span> <span class="hljs-string">new</span> <span class="hljs-string">content</span> <span class="hljs-string">here..</span>
|
||||
</code></pre></li>
|
||||
<li><p>Si vous le souhaitez, ajoutez zéro ou plus de documentations au fichier <a href="/docs/fr/1.13.0/navigation#adding-docs-to-a-sidebar"><code>sidebars.json</code></a> pour que votre documentation soit rendue dans la barre latérale.</p></li>
|
||||
|
@ -136,18 +135,22 @@ yarn run start <span class="hljs-comment"># or `npm run start`</span>
|
|||
<li>Remove the <code>index.js</code> file from the <code>website/pages</code> directory, if it exists.</li>
|
||||
<li>Ajouter une page <a href="/docs/fr/1.13.0/custom-pages#adding-static-pages">statique personnalisée <code>index.html</code></a> dans le répertoire <code>site/static</code> avec le contenu suivant :</li>
|
||||
</ol>
|
||||
<pre><code class="hljs css language-html"><span class="hljs-meta"><!DOCTYPE HTML></span>
|
||||
<pre><code class="hljs css language-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>
|
||||
<span class="hljs-tag"><<span class="hljs-name">head</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">http-equiv</span>=<span class="hljs-string">"refresh"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"0; url=docs/id-of-doc-to-land-on.html"</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span> /></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">meta</span>
|
||||
<span class="hljs-attr">http-equiv</span>=<span class="hljs-string">"refresh"</span>
|
||||
<span class="hljs-attr">content</span>=<span class="hljs-string">"0; url=docs/id-of-doc-to-land-on.html"</span>
|
||||
/></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text/javascript"</span>></span><span class="javascript">
|
||||
<span class="hljs-built_in">window</span>.location.href = <span class="hljs-string">'docs/id-of-doc-to-land-on.html'</span>;
|
||||
</span><span class="hljs-tag"></<span class="hljs-name">script</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">title</span>></span>Your Site Title Here<span class="hljs-tag"></<span class="hljs-name">title</span>></span>
|
||||
<span class="hljs-tag"></<span class="hljs-name">head</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">body</span>></span>
|
||||
If you are not redirected automatically, follow this <span class="hljs-tag"><<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"docs/id-of-doc-to-land-on.html"</span>></span>link<span class="hljs-tag"></<span class="hljs-name">a</span>></span>.
|
||||
If you are not redirected automatically, follow this
|
||||
<span class="hljs-tag"><<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"docs/id-of-doc-to-land-on.html"</span>></span>link<span class="hljs-tag"></<span class="hljs-name">a</span>></span>.
|
||||
<span class="hljs-tag"></<span class="hljs-name">body</span>></span>
|
||||
<span class="hljs-tag"></<span class="hljs-name">html</span>></span>
|
||||
</code></pre>
|
||||
|
|
|
@ -111,7 +111,6 @@
|
|||
<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>
|
||||
<span class="hljs-meta">---</span>
|
||||
|
||||
<span class="hljs-string">My</span> <span class="hljs-string">new</span> <span class="hljs-string">content</span> <span class="hljs-string">here..</span>
|
||||
</code></pre></li>
|
||||
<li><p>Si vous le souhaitez, ajoutez zéro ou plus de documentations au fichier <a href="/docs/fr/1.13.0/navigation#adding-docs-to-a-sidebar"><code>sidebars.json</code></a> pour que votre documentation soit rendue dans la barre latérale.</p></li>
|
||||
|
@ -136,18 +135,22 @@ yarn run start <span class="hljs-comment"># or `npm run start`</span>
|
|||
<li>Remove the <code>index.js</code> file from the <code>website/pages</code> directory, if it exists.</li>
|
||||
<li>Ajouter une page <a href="/docs/fr/1.13.0/custom-pages#adding-static-pages">statique personnalisée <code>index.html</code></a> dans le répertoire <code>site/static</code> avec le contenu suivant :</li>
|
||||
</ol>
|
||||
<pre><code class="hljs css language-html"><span class="hljs-meta"><!DOCTYPE HTML></span>
|
||||
<pre><code class="hljs css language-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>
|
||||
<span class="hljs-tag"><<span class="hljs-name">head</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">http-equiv</span>=<span class="hljs-string">"refresh"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"0; url=docs/id-of-doc-to-land-on.html"</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span> /></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">meta</span>
|
||||
<span class="hljs-attr">http-equiv</span>=<span class="hljs-string">"refresh"</span>
|
||||
<span class="hljs-attr">content</span>=<span class="hljs-string">"0; url=docs/id-of-doc-to-land-on.html"</span>
|
||||
/></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text/javascript"</span>></span><span class="javascript">
|
||||
<span class="hljs-built_in">window</span>.location.href = <span class="hljs-string">'docs/id-of-doc-to-land-on.html'</span>;
|
||||
</span><span class="hljs-tag"></<span class="hljs-name">script</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">title</span>></span>Your Site Title Here<span class="hljs-tag"></<span class="hljs-name">title</span>></span>
|
||||
<span class="hljs-tag"></<span class="hljs-name">head</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">body</span>></span>
|
||||
If you are not redirected automatically, follow this <span class="hljs-tag"><<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"docs/id-of-doc-to-land-on.html"</span>></span>link<span class="hljs-tag"></<span class="hljs-name">a</span>></span>.
|
||||
If you are not redirected automatically, follow this
|
||||
<span class="hljs-tag"><<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"docs/id-of-doc-to-land-on.html"</span>></span>link<span class="hljs-tag"></<span class="hljs-name">a</span>></span>.
|
||||
<span class="hljs-tag"></<span class="hljs-name">body</span>></span>
|
||||
<span class="hljs-tag"></<span class="hljs-name">html</span>></span>
|
||||
</code></pre>
|
||||
|
|
|
@ -160,7 +160,7 @@ languages.js
|
|||
}
|
||||
}
|
||||
},
|
||||
<span class="hljs-attr">"pages-strings"</span> : {
|
||||
<span class="hljs-attr">"pages-strings"</span>: {
|
||||
<span class="hljs-attr">"id3"</span>: <span class="hljs-string">"string3"</span>,
|
||||
<span class="hljs-attr">"id4"</span>: <span class="hljs-string">"string4"</span>
|
||||
}
|
||||
|
@ -173,8 +173,8 @@ languages.js
|
|||
<span class="hljs-attr">"localized-strings"</span>: {
|
||||
<span class="hljs-attr">"translation"</span>: <span class="hljs-string">"Translations and Localization"</span>
|
||||
},
|
||||
<span class="hljs-attr">"pages-strings"</span> : {
|
||||
<span class="hljs-attr">"Help Translate|recruit community translators for your project"</span>: <span class="hljs-string">"Help Us Translate"</span>
|
||||
<span class="hljs-attr">"pages-strings"</span>: {
|
||||
<span class="hljs-attr">"Help Translate|recruit community translators for your project"</span>: <span class="hljs-string">"Help Us Translate"</span>
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
|
@ -204,12 +204,12 @@ languages.js
|
|||
<p>Below is an example Crowdin configuration for the respective languages: German, Spanish, French, Japanese, Korean, Bahasa Indonesia, Portuguese Brazilian, Chinese Simplified, and Chinese Traditional.</p>
|
||||
<pre><code class="hljs css language-yaml"><span class="hljs-attr">project_identifier_env:</span> <span class="hljs-string">CROWDIN_DOCUSAURUS_PROJECT_ID</span>
|
||||
<span class="hljs-attr">api_key_env:</span> <span class="hljs-string">CROWDIN_DOCUSAURUS_API_KEY</span>
|
||||
<span class="hljs-attr">base_path:</span> <span class="hljs-string">"./"</span>
|
||||
<span class="hljs-attr">base_path:</span> <span class="hljs-string">'./'</span>
|
||||
<span class="hljs-attr">preserve_hierarchy:</span> <span class="hljs-literal">true</span>
|
||||
|
||||
<span class="hljs-attr">files:</span>
|
||||
<span class="hljs-bullet">-</span>
|
||||
<span class="hljs-attr">source:</span> <span class="hljs-string">'/docs/**/*.md'</span>
|
||||
|
||||
<span class="hljs-bullet">-</span> <span class="hljs-attr">source:</span> <span class="hljs-string">'/docs/**/*.md'</span>
|
||||
<span class="hljs-attr">translation:</span> <span class="hljs-string">'/website/translated_docs/%locale%/**/%original_file_name%'</span>
|
||||
<span class="hljs-attr">languages_mapping:</span> <span class="hljs-meta">&anchor</span>
|
||||
<span class="hljs-attr">locale:</span>
|
||||
|
|
|
@ -160,7 +160,7 @@ languages.js
|
|||
}
|
||||
}
|
||||
},
|
||||
<span class="hljs-attr">"pages-strings"</span> : {
|
||||
<span class="hljs-attr">"pages-strings"</span>: {
|
||||
<span class="hljs-attr">"id3"</span>: <span class="hljs-string">"string3"</span>,
|
||||
<span class="hljs-attr">"id4"</span>: <span class="hljs-string">"string4"</span>
|
||||
}
|
||||
|
@ -173,8 +173,8 @@ languages.js
|
|||
<span class="hljs-attr">"localized-strings"</span>: {
|
||||
<span class="hljs-attr">"translation"</span>: <span class="hljs-string">"Translations and Localization"</span>
|
||||
},
|
||||
<span class="hljs-attr">"pages-strings"</span> : {
|
||||
<span class="hljs-attr">"Help Translate|recruit community translators for your project"</span>: <span class="hljs-string">"Help Us Translate"</span>
|
||||
<span class="hljs-attr">"pages-strings"</span>: {
|
||||
<span class="hljs-attr">"Help Translate|recruit community translators for your project"</span>: <span class="hljs-string">"Help Us Translate"</span>
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
|
@ -204,12 +204,12 @@ languages.js
|
|||
<p>Below is an example Crowdin configuration for the respective languages: German, Spanish, French, Japanese, Korean, Bahasa Indonesia, Portuguese Brazilian, Chinese Simplified, and Chinese Traditional.</p>
|
||||
<pre><code class="hljs css language-yaml"><span class="hljs-attr">project_identifier_env:</span> <span class="hljs-string">CROWDIN_DOCUSAURUS_PROJECT_ID</span>
|
||||
<span class="hljs-attr">api_key_env:</span> <span class="hljs-string">CROWDIN_DOCUSAURUS_API_KEY</span>
|
||||
<span class="hljs-attr">base_path:</span> <span class="hljs-string">"./"</span>
|
||||
<span class="hljs-attr">base_path:</span> <span class="hljs-string">'./'</span>
|
||||
<span class="hljs-attr">preserve_hierarchy:</span> <span class="hljs-literal">true</span>
|
||||
|
||||
<span class="hljs-attr">files:</span>
|
||||
<span class="hljs-bullet">-</span>
|
||||
<span class="hljs-attr">source:</span> <span class="hljs-string">'/docs/**/*.md'</span>
|
||||
|
||||
<span class="hljs-bullet">-</span> <span class="hljs-attr">source:</span> <span class="hljs-string">'/docs/**/*.md'</span>
|
||||
<span class="hljs-attr">translation:</span> <span class="hljs-string">'/website/translated_docs/%locale%/**/%original_file_name%'</span>
|
||||
<span class="hljs-attr">languages_mapping:</span> <span class="hljs-meta">&anchor</span>
|
||||
<span class="hljs-attr">locale:</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue