mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
3085d10e1a
Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
169 lines
7.5 KiB
Plaintext
169 lines
7.5 KiB
Plaintext
---
|
|
title: "Hidden pages"
|
|
description: "Hide documentation pages from the sidebar navigation while keeping them accessible via direct URL, search, or AI assistant for special use cases."
|
|
keywords: ["hide from navigation", "unlisted", "page visibility"]
|
|
---
|
|
|
|
Hidden pages don't appear in your site's navigation, but anyone who knows the URL can still access them. For example, if you create a hidden page like `guides/hidden-page.mdx`, visitors can reach it at `docs.yoursite.com/guides/hidden-page`.
|
|
|
|
Use hidden pages for content you want users to access or reference as context for AI tools, but don't want listed in the navigation.
|
|
|
|
<Warning>
|
|
Hidden pages are not private. Anyone with the URL can view them, and links shared externally still work. Hiding a page only removes it from the rendered navigation.
|
|
|
|
If your content requires strict access control, you must configure [authentication](/deploy/authentication-setup). To restrict pages to specific user groups, set up [group-based access control](/deploy/authentication-setup#control-access-with-groups).
|
|
</Warning>
|
|
|
|
See an [example of a hidden page](/organize/hidden-page-example).
|
|
|
|
<Note>
|
|
Some navigation elements like sidebars, dropdowns, and tabs may appear empty or shift layout on hidden pages.
|
|
</Note>
|
|
|
|
## Hide a page
|
|
|
|
To hide a page, set `hidden: true` in the page's [frontmatter](/organize/pages) or remove it from your `docs.json` navigation.
|
|
|
|
### Set `hidden: true` in frontmatter
|
|
|
|
Add `hidden: true` to a page's frontmatter to remove it from the rendered navigation while still including it in your `docs.json` configuration.
|
|
|
|
```yaml
|
|
---
|
|
title: "My hidden page"
|
|
hidden: true
|
|
---
|
|
```
|
|
|
|
To make a page visible again, remove the `hidden` field entirely. Setting `hidden: false` has the same effect on the navigation, but avoid it on pages inside a hidden group or tab. Those pages stay out of the navigation because their parent isn't rendered, but `hidden: false` puts them back into search, sitemaps, and AI context.
|
|
|
|
<Note>
|
|
By default, `hidden: true` excludes a page from search engine indexing, sitemaps, and AI context.
|
|
|
|
To include it anyway, set `seo.indexing: "all"` in `docs.json`. See [Search, SEO, and AI indexing](#search-seo-and-ai-indexing) for details.
|
|
|
|
`noindex: true` only affects indexing. It does not hide the page from navigation. See [Disable indexing](/optimize/seo#disable-indexing) for more information.
|
|
</Note>
|
|
|
|
### Remove the page from navigation
|
|
|
|
If you don't include a page in your `docs.json` navigation, you hide it. This method works well for pages that you don't want to appear in navigation at all.
|
|
|
|
## Hide a group of pages
|
|
|
|
To hide a group of pages, set the `hidden` property to `true` for the group in your `docs.json` file:
|
|
|
|
```json highlight={4}
|
|
"groups": [
|
|
{
|
|
"group": "Getting started",
|
|
"hidden": true,
|
|
"pages": [
|
|
"index",
|
|
"quickstart"
|
|
]
|
|
},
|
|
{
|
|
"group": "Guides",
|
|
"pages": [
|
|
"guides/hidden-page.mdx",
|
|
"guides/hidden-groups.mdx"
|
|
]
|
|
}
|
|
]
|
|
```
|
|
|
|
In this example, the `Getting started` group stays hidden and the `Guides` group remains visible.
|
|
|
|
### Hide a tab
|
|
|
|
To hide a tab, add the `hidden` property for the tab in your `docs.json` file:
|
|
|
|
```json highlight={4}
|
|
"tabs": [
|
|
{
|
|
"tab": "Home",
|
|
"hidden": true,
|
|
"pages": [
|
|
"index",
|
|
"quickstart"
|
|
]
|
|
}
|
|
]
|
|
```
|
|
|
|
## Search, SEO, and AI indexing
|
|
|
|
By default, hidden pages don't appear in indexing for search engines, documentation site search, or as AI assistant context. You have two ways to include hidden content in search and indexing.
|
|
|
|
The following table summarizes how each property affects page visibility and indexing:
|
|
|
|
| Property | Sidebar navigation | Site search | Sitemap | Search engine indexing | AI assistant context | `llms.txt` |
|
|
|---|---|---|---|---|---|---|
|
|
| `hidden: true` (page frontmatter) | Hidden | Excluded | Excluded | Excluded | Excluded | Excluded |
|
|
| Page not listed in `docs.json` | Hidden | Excluded | Excluded | Excluded from sitemap only | Excluded | Excluded |
|
|
| `noindex: true` (page frontmatter) | Visible | Excluded | Excluded | Excluded | Excluded | Excluded |
|
|
| `searchable: false` (page frontmatter) | Visible | Excluded | Included | Included | Excluded | Included |
|
|
| `searchable: true` (on hidden tab or group) | Hidden | Included | Included | Included | Included | Included |
|
|
| `seo.indexing: "all"` (in `docs.json`) | Hidden | Included | Included | Included | Included | Included |
|
|
|
|
The two ways to hide a page differ for search engines. `hidden: true` adds a `noindex` meta tag to the page, which tells crawlers not to index it. Leaving a page out of your `docs.json` navigation only keeps it out of your `sitemap.xml`, so a crawler that finds the URL somewhere else can still index the page. Add `hidden: true` or `noindex: true` to the page's frontmatter when you need the meta tag.
|
|
|
|
The `llms.txt` column also applies to `llms-full.txt`. See [llms.txt](/ai/llmstxt) for details on both files.
|
|
|
|
### Include all hidden pages
|
|
|
|
To include every hidden page across your site in search, sitemaps, and AI context, add the `seo` property to your `docs.json`:
|
|
|
|
```json
|
|
"seo": {
|
|
"indexing": "all"
|
|
}
|
|
```
|
|
|
|
### Include pages under specific hidden tabs or groups
|
|
|
|
To include only the pages under a specific hidden tab or group, set `searchable: true` on that tab or group in your `docs.json`. Use this option when you hide tabs or groups to control navigation layout but still want descendant pages discoverable.
|
|
|
|
```json highlight={5}
|
|
"tabs": [
|
|
{
|
|
"tab": "Storage",
|
|
"hidden": true,
|
|
"searchable": true,
|
|
"groups": [
|
|
{
|
|
"group": "Buckets",
|
|
"pages": ["products/storage/buckets/create-bucket"]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
```
|
|
|
|
With `searchable: true`, descendant pages remain in:
|
|
|
|
- Documentation site search
|
|
- `sitemap.xml`
|
|
- AI assistant context
|
|
- MCP server search results
|
|
- Search engine indexing (the `noindex` meta tag is not applied)
|
|
|
|
The tab or group itself stays hidden from the rendered navigation.
|
|
|
|
A page's own `hidden: true` frontmatter always takes precedence. To re-exclude a descendant group, set `hidden: true` on it without `searchable: true`.
|
|
|
|
### Page-level `searchable`
|
|
|
|
At the page frontmatter level, only `searchable: false` has an effect. Use it to keep a page indexable by external search engines while excluding it from in-product search and AI assistant context. Pages with `searchable: false` still appear in your `llms.txt` and `llms-full.txt` files. See [Exclude a page from search](/optimize/search#exclude-a-page-from-search) for an example.
|
|
|
|
Page-level `searchable` does not override `hidden: true` on the same page. To make a hidden page discoverable, leave `searchable` unset and either move it under a hidden tab or group with `searchable: true`, or set `seo.indexing: "all"` in `docs.json`.
|
|
|
|
### Understanding hidden versus noindex
|
|
|
|
The relationship between `hidden` and `noindex` is one-directional:
|
|
|
|
- **`hidden: true` → automatically applies `noindex`**: Pages with `hidden: true` in their frontmatter are automatically excluded from search engines, sitemaps, and AI context.
|
|
- **`noindex: true` → does NOT apply `hidden`**: Pages with `noindex: true` remain visible in navigation. They don't appear in site search, sitemaps, search engine indexing, or AI assistant context.
|
|
|
|
To exclude a specific page from search and indexing while keeping it visible in navigation, add `noindex: true` to its frontmatter. To hide a page from navigation as well, use `hidden: true`. To exclude a page only from your in-product search and AI assistant context while keeping it indexable by external search engines, use [`searchable: false`](/optimize/search#exclude-a-page-from-search) instead. |