-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
website: support hidden pages in nav-data #10180
Conversation
π€ This PR has changes in the |
@@ -1,147 +0,0 @@ | |||
var fs = require("fs"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is no longer needed, it has been implemented in our docs-page
component as part of react-components#220.
@@ -1,85 +0,0 @@ | |||
// Imports below are used in server-side only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a temporary hot fix for hidden pages, has been replaced by changes in react-components#220.
@@ -1,6 +0,0 @@ | |||
[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The *-nav-data-hidden.json
files were part of the temporary solution, so removing them. These nav-data items have been added to the proper nav-data
file, with the "hidden"
prop in place to reflect current state.
website/package.json
Outdated
@@ -12,7 +12,7 @@ | |||
"@hashicorp/react-call-to-action": "3.0.1", | |||
"@hashicorp/react-callouts": "7.0.2", | |||
"@hashicorp/react-content": "7.0.1", | |||
"@hashicorp/react-docs-page": "13.1.4", | |||
"@hashicorp/react-docs-page": "13.1.7-alpha.10", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will bump this to a stable release once these PRs are finalized and hashicorp/react-components#220 is merged and published.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
β Bumped to stable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent
* website: bump to docs-page prerelease with hidden page support * website: replace hidden pages hot fix for /docs, /api-docs, and /commmands * website: remove unused files for old hidden pages hotfix * website: bump to stable docs-page, w next-mdx-remote bump * website: bump to latest markdown-page
π If backport labels were added before merging, cherry-picking will start automatically. To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/364837. |
πβ
Cherry pick of commit adfaf29 onto |
* website: bump to docs-page prerelease with hidden page support * website: replace hidden pages hot fix for /docs, /api-docs, and /commmands * website: remove unused files for old hidden pages hotfix * website: bump to stable docs-page, w next-mdx-remote bump * website: bump to latest markdown-page
π Preview
ποΈ Asana task
This PR is a follow-up to #10087, and implements a more permanent and clean solution for "hidden" pages, via updates to our
docs-page
component.Items in
nav-data.json
now support an optional"hidden": true
property, which will hide the item (and any descendants) from the docs sidebar.Alongside this change, all
.mdx
files in eachcontent
folder must be included in the correspondingnav-data
file. The changes todocs-page
included an automated check which will throw an error during the website build process if there are any unlinked content files.