Site Preparation
Après l'installation de Docusaurus, vous avez maintenant un squelette de travail pour votre site web spécifique. La section suivante présente le reste de la structure de Docusaurus afin que vous puissiez préparer votre site.
Structure de fichiers
Comme indiqué après l'installation de Docusaurus, le script d'initialisation a crée une structure de dossier similaire à:
root-directory
├── docs
│ ├── doc1.md
│ ├── doc2.md
│ ├── doc3.md
│ ├── exampledoc4.md
│ └── exampledoc5.md
└── website
├── blog
│ ├── 2016-03-11-blog-post.md
│ ├── 2017-04-10-blog-post-two.md
│ ├── 2017-09-25-testing-rss.md
│ ├── 2017-09-26-adding-rss.md
│ └── 2017-10-24-new-version-1.0.0.md
├── core
│ └── Footer.js
├── package.json
├── pages
├── sidebars.json
├── siteConfig.js
└── static
Description des dossier
- Documentation Source Files: The
docs
directory contains example documentation files written in Markdown. - Blog: The
website/blog
directory contains examples of blog posts written in markdown. - Pages: Le répertoire
website/pages
contient les exemples des pages de premier niveau pour le site. - Fichiers statiques et images: Le répertoire
website/static
contient les composants statiques utilisé par le site web d'exemple.
Fichiers clé
- Pied de page: Le fichier
website/core/Footer.js
est un composant React qui sert comme pied de page pour le site généré par Docusaurus et qui peut-être customisé par l'utilisateur. - Fichier de configuration: Le fichier
website/siteConfig.js
est le principal fichier de configuration utilisé par Docusaurus. - Sidebars: The
sidebars.json
file contains the structure and order of the documentation files.
Informations de préparation
You will need to keep the website/siteConfig.js
and website/core/Footer.js
files but may edit them as you wish. The value of the customDocsPath
key in website/siteConfig.js
can be modified if you wish to use a different directory name or path. The website
directory can also be renamed to anything you want it to be.
However, you should keep the website/pages
and website/static
directories. You may change the content inside them as you wish. At the bare minimum, you should have an en/index.js
or en/index.html
file inside website/pages
and an image to use as your header icon inside website/static
.