mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 16:29:47 +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>Add Versions · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="With an example site deployed, we can now try out one of the killer features of Docusaurus - versioned documentation. Versioned documentation helps to show relevant documentation to the users for the current version of the tool they are using and also hide unreleased documentation from users, reducing confusion. Documentations for older versions are also preserved and accessible to users of older versions of the tool even as the latest documentation changes."/><meta name="docsearch:version" content="1.12.0"/><meta name="docsearch:language" content="fr"/><meta property="og:title" content="Add Versions · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/"/><meta property="og:description" content="With an example site deployed, we can now try out one of the killer features of Docusaurus - versioned documentation. Versioned documentation helps to show relevant documentation to the users for the current version of the tool they are using and also hide unreleased documentation from users, reducing confusion. Documentations for older versions are also preserved and accessible to users of older versions of the tool even as the latest documentation changes."/><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>Add Versions · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="Avec un site d'exemple déployé, nous pouvons maintenant essayer l'une des fonctionnalités mortelles de Docusaurus - la documentation versionnée. La documentation versionnée aide à afficher la documentation pertinente aux utilisateurs pour la version actuelle de l'outil qu'ils utilisent et masque également la documentation non publiée aux utilisateurs, en réduisant la confusion. Les documentations pour les anciennes versions sont également conservées et accessibles aux utilisateurs des anciennes versions de l'outil même lorsque la dernière documentation est modifiée."/><meta name="docsearch:version" content="1.12.0"/><meta name="docsearch:language" content="fr"/><meta property="og:title" content="Add Versions · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/"/><meta property="og:description" content="Avec un site d'exemple déployé, nous pouvons maintenant essayer l'une des fonctionnalités mortelles de Docusaurus - la documentation versionnée. La documentation versionnée aide à afficher la documentation pertinente aux utilisateurs pour la version actuelle de l'outil qu'ils utilisent et masque également la documentation non publiée aux utilisateurs, en réduisant la confusion. Les documentations pour les anciennes versions sont également conservées et accessibles aux utilisateurs des anciennes versions de l'outil même lorsque la dernière documentation est modifiée."/><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,39 +80,39 @@
|
|||
};
|
||||
}
|
||||
});
|
||||
</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">Add Versions</h1></header><article><div><span><p>With an example site deployed, we can now try out one of the killer features of Docusaurus - versioned documentation. Versioned documentation helps to show relevant documentation to the users for the current version of the tool they are using and also hide unreleased documentation from users, reducing confusion. Documentations for older versions are also preserved and accessible to users of older versions of the tool even as the latest documentation changes.</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">Add Versions</h1></header><article><div><span><p>Avec un site d'exemple déployé, nous pouvons maintenant essayer l'une des fonctionnalités mortelles de Docusaurus - la documentation versionnée. La documentation versionnée aide à afficher la documentation pertinente aux utilisateurs pour la version actuelle de l'outil qu'ils utilisent et masque également la documentation non publiée aux utilisateurs, en réduisant la confusion. Les documentations pour les anciennes versions sont également conservées et accessibles aux utilisateurs des anciennes versions de l'outil même lorsque la dernière documentation est modifiée.</p>
|
||||
<p><img src="/img/undraw_docusaurus_process.svg" alt="Docusaurus process"> {.docImage}</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="releasing-a-version"></a><a href="#releasing-a-version" 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>Releasing a Version</h2>
|
||||
<p>Assuming we are happy with the current state of the documentation and we want to freeze it as the v1.0.0 docs. We first run the following command to generate a <code>versions.js</code> file, which will be used to list down all the versions of docs in the project.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="libérer-une-version"></a><a href="#libérer-une-version" 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>Libérer une version</h2>
|
||||
<p>En supposant que nous sommes satisfaits de l'état actuel de la documentation et que nous voulons la geler comme la documentation v1.0.0. Nous exécutons d'abord la commande suivante pour générer un fichier <code>versions.js</code> , qui sera utilisé pour lister toutes les versions de documents du projet.</p>
|
||||
<pre><code class="hljs css language-sh">npm run examples versions <span class="hljs-comment"># yarn examples versions</span>
|
||||
</code></pre>
|
||||
<p>Next, we run a command with the version we want to create, e.g. 1.0.0,</p>
|
||||
<p>Ensuite, nous exécutons une commande avec la version que nous voulons créer, par exemple 1.0.0,</p>
|
||||
<pre><code class="hljs css language-sh">npm run version 1.0.0 <span class="hljs-comment"># yarn version 1.0.0</span>
|
||||
</code></pre>
|
||||
<p>This will preserve all documents currently in the <code>docs</code> directory and make them available as documentation for version 1.0.0.</p>
|
||||
<p>Documents in the <code>docs</code> directory will be considered part of version next and they are available, for example, at the URL <code>localhost:3000/<baseUrl>/docs/next/doc1</code>. Documents from the latest version use the URL <code>docs/doc1</code>.</p>
|
||||
<p>Let's test out that versioning actually works. We can go to <code>docs/doc1.md</code> and change the first line of the body:</p>
|
||||
<p>Cela préservera tous les documents actuellement dans le répertoire <code>docs</code> et les rendra disponibles en tant que documentation pour la version 1.0.0.</p>
|
||||
<p>Les documents dans le répertoire <code>docs</code> seront considérés comme faisant partie de la version suivante et sont disponibles, par exemple, à l'URL <code>localhost:3000/<baseUrl>/docs/next/doc1</code>. Les documents de la dernière version utilisent l'URL <code>docs/doc1</code>.</p>
|
||||
<p>Testons comment le versionnage fonctionne réellement. On peut aller dans <code>docs/doc1.md</code> et changer la première ligne du corps :</p>
|
||||
<pre><code class="hljs css language-diff"><span class="hljs-comment">---</span>
|
||||
id: doc1
|
||||
title: Latin-ish
|
||||
sidebar_label: Example Page
|
||||
sidebar_label: Page d'exemple
|
||||
<span class="hljs-comment">---</span>
|
||||
|
||||
<span class="hljs-deletion">- Check the [documentation](https://docusaurus.io) for how to use Docusaurus.</span>
|
||||
<span class="hljs-addition">+ This is the latest version of the docs.</span>
|
||||
<span class="hljs-deletion">- Vérifiez la [documentation](https://docusaurus.io) pour savoir comment utiliser Docusaurus.</span>
|
||||
<span class="hljs-addition">+ Ceci est la dernière version de la documentation.</span>
|
||||
|
||||
## Lorem
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies.
|
||||
</code></pre>
|
||||
<p>If we go to the <code>localhost:3000/<baseUrl>/docs/doc1</code> URL in our browser, realize that it's still showing the previous line. That's because the version we're looking at now is the 1.0.0 version, which has already been frozen in time.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="next-version"></a><a href="#next-version" 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>Next Version</h2>
|
||||
<p>The latest versions of the docs have to be accessed by adding <code>next</code> to the URL: <code>localhost:3000/<baseUrl>/docs/next/doc1</code>. Note that the version beside the title also changes to <code>next</code> when we are on that URL.</p>
|
||||
<p>A versions page has been created for us at <code>localhost:3000/<baseUrl>/versions</code> which shows a list of the current versions of the documentation. See that both <code>1.0.0</code> and <code>master</code> are being listed here and they correctly link to the respective versions of the documentation.</p>
|
||||
<p>Go ahead and publish your versioned site!</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="wrap-up"></a><a href="#wrap-up" 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>Wrap Up</h2>
|
||||
<p>That's all folks! In this short tutorial, you have experienced how easy it was to create a documentation website from scratch and making versions for them. There are many more things you can do with Docusaurus, such as adding a blog, search and translations. Check out the Guides section for more.</p>
|
||||
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/fr/1.12.0/tutorial-publish-site"><span class="arrow-prev">← </span><span>Publier le site</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#releasing-a-version">Releasing a Version</a></li><li><a href="#next-version">Next Version</a></li><li><a href="#wrap-up">Wrap Up</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>Si nous allons à l'URL <code>localhost:3000/<baseUrl>/docs/doc1</code> dans notre navigateur, nous réalisons qu'elle montre toujours la ligne précédente. C'est parce que la version que nous regardons maintenant la version 1.0.0, qui a déjà été figée dans le temps.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="prochaine-version"></a><a href="#prochaine-version" 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>Prochaine version</h2>
|
||||
<p>Les dernières versions de la documentation doivent être accessibles en ajoutant <code>next</code> à l'URL : <code>localhost:3000/<baseUrl>/docs/next/doc1</code>. Notez que la version à côté du titre change également à <code>next</code> lorsque nous sommes sur cette URL.</p>
|
||||
<p>Une page de versions a été créée pour nous à l'adresse <code>localhost:3000/<baseUrl>/versions</code> qui affiche une liste des versions actuelles de la documentation. Vous voyez que <code>1.0.0</code> et <code>master</code> sont toutes les deux listées ici et qu'elles sont correctement liées aux versions respectives de la documentation.</p>
|
||||
<p>Allez-y et publiez votre site versionné !</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="récapitulatif"></a><a href="#récapitulatif" 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>Récapitulatif</h2>
|
||||
<p>C'est fini, Mesdames Messieurs ! Dans ce court tutoriel, vous avez pu constater à quel point il était facile de créer un site Web de documentation à partir de zéro et de créer des versions. Il y a bien d'autres choses que vous pouvez faire avec Docusaurus, comme ajouter un blog, rechercher et traduire. Consultez la section Guides pour en savoir plus.</p>
|
||||
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/fr/1.12.0/tutorial-publish-site"><span class="arrow-prev">← </span><span>Publier le site</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#libérer-une-version">Libérer une version</a></li><li><a href="#prochaine-version">Prochaine version</a></li><li><a href="#récapitulatif">Récapitulatif</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