Sections du site

Ajoutez plusieurs produits à votre site en tant que sections du site et créez un hub de contenu avec des onglets pour accéder à tout votre contenu

This feature is available on the Ultimate site plan.

A GitBook screenshot showing site sections on a docs site
Exemple d’un site GitBook avec des sections de site

With site sections, you can centralize all your documentation and create a seamless experience for your users.

Site sections are perfect for organizing your documentation — whether you’re managing separate products, or catering to both end-users and developers with content tailored to each.

Vous pouvez aussi regrouper des sections du site. Doing so will create a drop-down menu in your navigation bar — ideal for adding hierarchy to your site sections.

Sections or variants?

Each site section is a space in GitBook. You can create site sections from any space you like, but we recommend you use sections as semantically different parts of your docs.

Si vous souhaitez ajouter des variantes du même contenu — telles que des localisations ou des versions historiques du même produit — envisagez d’utiliser variantes de contenu instead.

Ajouter une section à votre site de documentation

From your docs site’s dashboard, open the Paramètres tab in the site header, then click Structure. Here you can see all the content of your site.

To add a site section, click the Nouvelle section button underneath the table and choose a space to link as a section. The new section is then added to the table and will be available to visitors as a tab at the top of your site.

A GitBook screenshot showing site section structure
Add structure to your docs with site sections.

Créer un groupe de sections de site

You can group site sections together under a single heading. Site section groups will appear as a drop-down in your site’s nav. Site sections in a group can also include an optional description, which appears below the section title in the drop-down menu.

To create a group, click the arrow next to the Nouvelle section bouton et choisissez Nouveau groupe de sections. Give your new group a name, then click Ajouter une section in the modal to add sections to your group. You can add existing sections of your site to the new group, or select another space you want to add using the menu.

Modification d’une section

You can change the name, icon and slug of each of your sections by tapping the Modifier button in the table row of the section you’d like to edit. This will open a modal. Edit the field(s) you’d like to change, then click the Enregistrer button. You can also delete the variant by clicking the Supprimer la variante button in the lower left.

Changing a section’s slug will change its canonical URL. GitBook will create an automatic redirect from the old URL to the new one. You can also créer manuellement des redirections.

Site sections within a group can also optionally display a description, which will appear in the drop-down menu of your site’s nav bar when the section group is hovered. See the image at the top of this page to see an example of how this can look in your published documentation.

Réorganisation des sections

Your site displays sections in the order that they appear in your Site structure table. Sections can be reordered by grabbing the Poignée de déplacement and moving it up or down. All the spaces within that section will be moved with it. The changed order will be reflected on your site immediately.

You can also use the keyboard to select and move content: select a section with the space bar, then use the arrow keys to move it up or down. Hit the space bar again to confirm the new position.

Définir une section par défaut

If you have multiple sections in your site, one section will be marked as the default. This section is shown when visitors arrive on your site, and is served from your site’s root URL. Other sections each have a slug that is appended to the root URL.

To set a section as default, click on the Menu Actions in the section's table row and then click Définir comme par défaut.

Supprimer une section

To remove a section from a site, click the Paramètres button from your docs site dashboard, then click Structure to find the content you want to remove. Click the Modifier button next to the section you want to remove, then click the Supprimer button in the lower left of the modal. This will remove the section, along with all the variants within it, from the published site. It will not delete the spaces itself, or the content within them.

To remove a section from a site, open the Paramètres tab from your docs site dashboard, then click Structure to find the content you want to remove.

Ouvrez le Menu Actions pour l’espace que vous souhaitez supprimer et choisissez Retirer.

Mis à jour

Ce contenu vous a-t-il été utile ?