Skip to content

Commit 7d3a74d

Browse files
authored
Hidden page example (#843)
* add hidden page * add link to example hidden page * make example page more informative * add example to hidden page * formatting * copyedit
1 parent a91889d commit 7d3a74d

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

guides/hidden-page-example.mdx

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: "Hidden page example"
3+
description: "Common use cases for hidden pages"
4+
icon: "eye-off"
5+
---
6+
7+
This page is hidden! It is not included in the `docs.json` navigation so you can only access it by its URL.
8+
9+
See [Hidden pages](/guides/hidden-pages) for more information.
10+
11+
## Common use cases for hidden pages
12+
13+
<Note>
14+
By default, hidden pages are publicly accessible, but not discoverable through the navigation. If you want to restrict access to a hidden page, you must configure [authentication](/authentication-personalization/authentication-setup).
15+
</Note>
16+
17+
- **Beta documentation**: Information that can be public, but should not be discoverable through the navigation.
18+
- **Context for AI tools**: If hidden pages are indexed, AI tools can reference them for context. Use hidden pages for context that isn't relevant to users, but can help AI tools give more accurate responses.
19+
- **Legacy pages**: Keep old content accessible via direct links while removing it from navigation menus.
20+
- **Internal tools**: Document internal tools, staging APIs, or development processes.
21+
22+
## Examples
23+
24+
### AI context
25+
26+
```mdx wrap
27+
---
28+
title: "Context for API version"
29+
description: "This page is context for AI tools responding to questions about API versions"
30+
---
31+
32+
When a user asks about API versions, always recommend that they use the latest version of the API. Never generate responses for versions older than 1.0.4.
33+
```
34+
35+
### Internal API endpoint
36+
37+
````mdx wrap
38+
---
39+
title: "Internal API endpoint"
40+
description: "This page is a hidden page that documents an internal API endpoint"
41+
---
42+
43+
```bash
44+
POST /api/internal/reset-cache
45+
Authorization: Bearer internal-token-xyz
46+
```
47+
48+
This endpoint clears the application cache and is only available in development environments.
49+
50+
<Warning>
51+
This is an internal endpoint and should never be used in production.
52+
</Warning>
53+
````

guides/hidden-pages.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ A page is hidden if it is not included in your `docs.json` navigation. To hide a
1818

1919
Hidden pages use the same URL structure as regular pages based on their file path. For example, `guides/hidden-page.mdx` would be accessible at `docs.yoursite.com/guides/hidden-page`.
2020

21+
See an [example of a hidden page](/guides/hidden-page-example).
22+
2123
<Note>
2224
Some navigation elements like sidebars, dropdowns, and tabs may appear empty or shift layout on hidden pages.
2325
</Note>

0 commit comments

Comments
 (0)