mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-05 12:22:45 +02:00
parent
9e86af3e60
commit
48bfb0ed7d
378 changed files with 3222 additions and 3222 deletions
|
@ -1,4 +1,4 @@
|
|||
<!DOCTYPE html><html lang="fr"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Create Pages · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="In this section, we will learn about creating two types of pages in Docusaurus: a regular page and a documentation page."/><meta name="docsearch:version" content="1.12.0"/><meta name="docsearch:language" content="fr"/><meta property="og:title" content="Create Pages · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/"/><meta property="og:description" content="In this section, we will learn about creating two types of pages in Docusaurus: a regular page and a documentation page."/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
<!DOCTYPE html><html lang="fr"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Create Pages · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="Dans cette section, nous apprendrons comment créer deux types de pages dans Docusaurus : une page normale et une page de documentation."/><meta name="docsearch:version" content="1.12.0"/><meta name="docsearch:language" content="fr"/><meta property="og:title" content="Create Pages · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/"/><meta property="og:description" content="Dans cette section, nous apprendrons comment créer deux types de pages dans Docusaurus : une page normale et une page de documentation."/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
|
@ -80,11 +80,11 @@
|
|||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer docsContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/fr" target="_blank" rel="noreferrer noopener">Translate</a><h1 id="__docusaurus" class="postHeaderTitle">Create Pages</h1></header><article><div><span><p>In this section, we will learn about creating two types of pages in Docusaurus: a regular page and a documentation page.</p>
|
||||
</script></nav></div><div class="container mainContainer docsContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/fr" target="_blank" rel="noreferrer noopener">Translate</a><h1 id="__docusaurus" class="postHeaderTitle">Create Pages</h1></header><article><div><span><p>Dans cette section, nous apprendrons comment créer deux types de pages dans Docusaurus : une page normale et une page de documentation.</p>
|
||||
<p><img src="/img/undraw_docusaurus_tree.svg" alt="Docusaurus MacBook"> {.docImage}</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="creating-a-regular-page"></a><a href="#creating-a-regular-page" 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>Creating a Regular Page</h2>
|
||||
<h2><a class="anchor" aria-hidden="true" id="création-dune-page-ordinaire"></a><a href="#création-dune-page-ordinaire" 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>Création d'une page ordinaire</h2>
|
||||
<ol>
|
||||
<li><p>Go into the <code>pages/en</code> directory and create a file called <code>hello-world.js</code> with the following contents:</p>
|
||||
<li><p>Allez dans le répertoire <code>pages/en</code> et créez un fichier appelé <code>hello-world.js</code> avec le contenu suivant :</p>
|
||||
<p>const React = require('react');</p>
|
||||
<p>const CompLibrary = require('../../core/CompLibrary.js');</p>
|
||||
<p>const Container = CompLibrary.Container;
|
||||
|
@ -94,7 +94,7 @@ return (
|
|||
<div className="docMainWrapper wrapper">
|
||||
<Container className="mainContainer documentContainer postContainer">
|
||||
<h1>Hello World!</h1>
|
||||
<p>This is my first page!</p>
|
||||
<p>C'est ma première page !</p>
|
||||
</Container>
|
||||
</div>
|
||||
);
|
||||
|
@ -102,37 +102,37 @@ return (
|
|||
<p>module.exports = HelloWorld;</p></li>
|
||||
</ol>
|
||||
<ol start="2">
|
||||
<li>Go to <a href="http://localhost:3000/hello-world">http://localhost:3000/hello-world</a> and you should be able to see the new page.</li>
|
||||
<li>Change the text within the <code><p>...</p></code> to "I can write JSX here!". The browser should refresh automatically to reflect the changes.</li>
|
||||
<li>Allez à l'adresse <a href="http://localhost:3000/hello-world">http://localhost:3000/hello-world</a> et vous devriez pouvoir voir la nouvelle page.</li>
|
||||
<li>Changez le texte dans le <code><p>...</p></code> en "Je peux écrire du JSX ici !". Le navigateur devrait se rafraîchir automatiquement pour faire apparaître les changements.</li>
|
||||
</ol>
|
||||
<pre><code class="hljs css language-diff"><span class="hljs-deletion">- <p>This is my first page!</p></span>
|
||||
<span class="hljs-addition">+ <p>I can write JSX here!</p></span>
|
||||
<pre><code class="hljs css language-diff"><span class="hljs-deletion">- <p>C'est ma première page !</p></span>
|
||||
<span class="hljs-addition">+ <p>Je peux écrire du JSX ici !</p></span>
|
||||
</code></pre>
|
||||
<p>React is being used as a templating engine for rendering static markup. You can leverage on the expressibility of React to build rich web content. Learn more about creating pages <a href="custom-pages">here</a>.</p>
|
||||
<p>React est utilisé comme moteur de template pour le rendu du balisage statique. Vous pouvez tirer parti de la puissance d'expression de React pour créer du contenu web riche. Apprenez en plus sur la création de pages <a href="custom-pages">ici</a>.</p>
|
||||
<p><img src="/img/undraw_docusaurus_react.svg" alt="Docusaurus React"> {.docImage}</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="create-a-documentation-page"></a><a href="#create-a-documentation-page" 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 a Documentation Page</h2>
|
||||
<h2><a class="anchor" aria-hidden="true" id="création-dune-page-de-documentation"></a><a href="#création-dune-page-de-documentation" 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>Création d'une page de documentation</h2>
|
||||
<ol>
|
||||
<li><p>Create a new file in the <code>docs</code> folder called <code>doc4.md</code>. The <code>docs</code> folder is in the root of your Docusaurus project, one level above <code>website</code>.</p></li>
|
||||
<li><p>Paste the following contents:</p>
|
||||
<li><p>Créer un nouveau fichier dans le dossier <code>docs</code> appelé <code>doc4.md</code>. Le dossier <code>docs</code> est à la racine de votre projet Docusaurus, un niveau au-dessus de <code>website</code>.</p></li>
|
||||
<li><p>Collez le contenu suivant :</p>
|
||||
<hr>
|
||||
<p>id: doc4
|
||||
title: This is Doc 4</p>
|
||||
title: Il s'agit du Doc 4</p>
|
||||
<hr>
|
||||
<p>I can write content using <a href="https://github.github.com/gfm/">GitHub-flavored Markdown syntax</a>.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="markdown-syntax"></a><a href="#markdown-syntax" 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>Markdown Syntax</h2>
|
||||
<p><strong>Bold</strong> <em>italic</em> <code>code</code> <a href="#url">Links</a></p>
|
||||
<p>Je peux écrire du contenu en utilisant la <a href="https://github.github.com/gfm/">syntaxe de Markdown flavored GitHub</a>.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="syntaxe-de-markdown"></a><a href="#syntaxe-de-markdown" 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>Syntaxe de Markdown</h2>
|
||||
<p><strong>Gras</strong> <em>italique</em> <code>code</code> <a href="#url">Liens</a></p>
|
||||
<blockquote>
|
||||
<p>Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
|
||||
id sem consectetuer libero luctus adipiscing.</p>
|
||||
</blockquote>
|
||||
<ul>
|
||||
<li>Hey</li>
|
||||
<li>Salut</li>
|
||||
<li>Ho</li>
|
||||
<li>Let's Go</li>
|
||||
<li>Allons-y</li>
|
||||
</ul></li>
|
||||
</ol>
|
||||
<ol start="3">
|
||||
<li>The <code>sidebars.json</code> is where you specify the order of your documentation pages, so open <code>website/sidebars.json</code> and add <code>"doc4"</code> after <code>"doc1"</code>. This ID should be the same one as in the metadata for the Markdown file above, so if you gave a different ID in Step 2, just make sure to use the same ID in the sidebar file.</li>
|
||||
<li>Le <code>sidebars.json</code> est l'endroit où vous spécifiez l'ordre de vos pages de documentation, alors ouvrez <code>website/sidebars.json</code> et ajoutez <code>"doc4"</code> après <code>"doc1"</code>. Cet ID doit être le même que dans les métadonnées du fichier Markdown ci-dessus, donc si vous avez donné un ID différent à l'étape 2, assurez-vous d'utiliser le même ID dans le fichier de la barre latérale.</li>
|
||||
</ol>
|
||||
<pre><code class="hljs css language-diff">{
|
||||
"docs": {
|
||||
|
@ -149,12 +149,12 @@ id sem consectetuer libero luctus adipiscing.</p>
|
|||
}
|
||||
</code></pre>
|
||||
<ol start="4">
|
||||
<li>A server restart is needed to pick up sidebar changes, so kill your dev server (<kbd>Cmd</kbd> + <kbd>C</kbd> or <kbd>Ctrl</kbd> + <kbd>C</kbd>) and restart it with <code>npm run start</code>.</li>
|
||||
<li>Navigate to <a href="http://localhost:3000/docs/doc4">http://localhost:3000/docs/doc4</a>.</li>
|
||||
<li>Un redémarrage du serveur est nécessaire pour récupérer les modifications de la barre latérale, alors tuez votre serveur de développement (<kbd>Cmd</kbd> + <kbd>C</kbd> ou <kbd>Ctrl</kbd> + <kbd>C</kbd>) et redémarrez-le avec <code>npm run start</code>.</li>
|
||||
<li>Naviguez vers l'adresse <a href="http://localhost:3000/docs/doc4">http://localhost:3000/docs/doc4</a>.</li>
|
||||
</ol>
|
||||
<p>You've created your first documentation page on Docusaurus!</p>
|
||||
<p>Learn more about creating docs pages <a href="navigation">here</a>.</p>
|
||||
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/fr/1.12.0/tutorial-create-new-site"><span class="arrow-prev">← </span><span>Créer un nouveau site</span></a><a class="docs-next button" href="/docs/fr/1.12.0/tutorial-publish-site"><span>Publier le site</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#creating-a-regular-page">Creating a Regular Page</a></li><li><a href="#create-a-documentation-page">Create a Documentation Page</a></li><li><a href="#markdown-syntax">Markdown Syntax</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
<p>Vous avez créé votre première page de documentation sur Docusaurus !</p>
|
||||
<p>Apprenez en plus sur la création de page de documentation <a href="navigation">ici</a>.</p>
|
||||
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/fr/1.12.0/tutorial-create-new-site"><span class="arrow-prev">← </span><span>Créer un nouveau site</span></a><a class="docs-next button" href="/docs/fr/1.12.0/tutorial-publish-site"><span>Publier le site</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#création-dune-page-ordinaire">Création d'une page ordinaire</a></li><li><a href="#création-dune-page-de-documentation">Création d'une page de documentation</a></li><li><a href="#syntaxe-de-markdown">Syntaxe de Markdown</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/fr/installation">Getting Started</a><a href="
|
||||
/docs/fr/versioning">Versioning</a><a href="
|
||||
/docs/fr/translation">Localization</a><a href="
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue