Site structure and navigation
Decide how your site is structured to best fit your content.
Last updated
Decide how your site is structured to best fit your content.
Last updated
The content on your site comes from spaces in your organization. You can link one or multiple spaces. GitBook will publish each one and take care of navigation between spaces.
Linked spaces can serve as one of two different content types, which determine how GitBook treats them in relation to each other and shows them to visitors.
Updated site sections are slowly rolling out to users. Hang tight, as you may not have access to this feature at this point.
From your docs site’s dashboard, click the Settings button, then scroll down to Site structure. Here you can see all the content of your site, divided into sections and variants.
Your site starts out with a single section with your site's name and a single variant with the space you linked during your site's set-up.
To add a variant, click the Add variant button in the section you'd like to add to, then choose a space to link. The new variant is then added to the list of variants within the chosen section and will be available to visitors in the variant dropdown on your site.
To add a section, click the Add section button underneath the table and choose a space to link as a section. This space will serve as the first (or only) variant within your new 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.
When you add a space (as a variant or section), we generate a name and slug for it based on the space's title.
Changing a linked space's slug will change the space's canonical URL, and might result in broken links across your site.
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.
If you have multiple variants within a section, one variant will be marked as the default. Like sections, the default variant is shown when visitors arrive on your site (or when they visit a section). Other variants each have a slug that is appended to the section's URL.
Setting a space as default removes its slug field, as it will be served from the section root instead. We will redirect the space's slug to the appropriate path, to ensure visitors keep seeing your content.
You can change the name and slug of each of your linked spaces by tapping the Edit button in the table row of the space you'd like to edit. Edit the field(s) you'd like to change, then click the Save button to save.
To replace a linked space with a different space, click on the More menu in the space's table row and then click Replace linked space.
Your site displays linked spaces in the order that they appear in your Site structure table. Spaces can be reordered by grabbing the Drag handle and moving it up or down. Alternatively, you can press the More menu in the table row of the space you'd like to edit and choosing Move up or Move down. The changed order will be reflected on your site immediately.
To set a space as default, click on the More menu in the space's table row and then click Set as default.
To remove the content of a space from a site, click the Settings button from your docs site dashboard, then scroll down to the Site structure section to find the content you want to remove. Open the More menu next to the linked space you want to remove and select Delete from site. This will remove it from the published site, but will not delete the space or the content within.