web-unified-docs.
Decide your content type
Decide whether your content is a concept, usage guide, overview, index, or reference page. Refer to the Content Types guide for detailed explanations and templates.If you have questions about which type fits your content, reach out to your product’s tech writer team.
Create the page file
Decide which directory your new content belongs in within your product’s most recent version folder.
Create a file ending in
| Section | Common directory location |
|---|---|
| Documentation | docs/ |
| CLI reference | commands/, docs/commands/, or docs/cli/ (varies by product) |
| API reference | api-docs/ (varies by product — check with your team before creating API content manually) |
The path in the version content directory becomes the URL route. For example, if you add
my-new-page.mdx to web-unified-docs/content/vault/v1.20.x/docs/concepts and v1.20.x is the latest version, the website URL will be https://developer.hashicorp.com/vault/docs/concepts/my-new-page..mdx in the appropriate directory. Choose a short filename that describes your page’s topic. Do not repeat the folder name in the file name.Create your content
Use the appropriate page template from the Content Types guide as a starting point.Every page requires YAML frontmatter with at minimum a Follow the Education style guide’s top 12 guidelines when creating your content.
title and description:Add the page to the navigation sidebar
Your page will not render on the website until you add an entry to the navigation sidebar file.Sidebar files live in the product’s Refer to the Navigation Sidebars guide for a full explanation of the sidebar data format, custom links, and nested entries.
<version>/data directory. For example, docs-nav-data.json controls the sidebar for the docs section.In the example below, the new file is web-unified-docs/content/vault/v1.20.x/docs/concepts/tokens.mdx with the title “Tokens”. Add the new page to the section of docs-nav-data.json that corresponds to the filesystem directory:Sidebar deep dive
The sidebar uses a simple recursive data structure to represent files and directories. It mirrors the filesystem structure while allowing custom ordering. Given this directory layout:docs-nav-data.json entry:
- Ordering is flexible, hierarchy is not. You can reorder siblings, but you cannot un-nest a directory entry without also un-nesting it in the filesystem.
- The
titleproperty is the human-readable label shown in the navigation. - The
pathproperty on leaf nodes is the URL path where the.mdxdocument renders. index.mdxfiles must be explicitly listed, but the path resolves from the directory name — use"path": "directory"rather than"path": "directory/index".- A common convention is to set the
titleof an index node to"Overview".
Custom and external links
You can include links in the sidebar that point outside the docs hierarchy using thehref property instead of path:
href) display a small external link icon. Internal links using href appear the same as regular file links.