feat(website): hide individual blog articles from top menu.#1808
feat(website): hide individual blog articles from top menu.#1808
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a Nextra _meta.ts configuration for the blog content folder intended to hide blog post pages from appearing in site navigation.
Changes:
- Add
website/src/content/blog/_meta.tswith a folder-wide defaultdisplay: "hidden"setting.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| export default { | ||
| "*": { | ||
| display: "hidden", | ||
| }, | ||
| } satisfies MetaRecord; |
There was a problem hiding this comment.
Setting the folder fallback to display: "hidden" will hide every blog post from Nextra’s normalized page list. In this codebase, getPosts() (used by /blog, tags pages, and generateStaticParams for /blog/[slug]) is built on normalizePages(...), which skips items with display: 'hidden', so this change would result in zero posts being listed and zero blog pages being statically generated. To achieve “hide from menu” without breaking the blog, either (a) avoid using display: "hidden" for all posts, or (b) refactor the blog listing/static params logic to enumerate posts without normalizePages’ hidden filtering (e.g., traverse getPageMap('/blog') directly or read the MDX files from disk).
| export default { | |
| "*": { | |
| display: "hidden", | |
| }, | |
| } satisfies MetaRecord; | |
| export default {} satisfies MetaRecord; |
This pull request introduces a new
_meta.tsfile for the blog content in thewebsitedirectory. The file sets a default metadata configuration to hide all blog posts from display.Metadata configuration:
website/src/content/blog/_meta.tsfile that hides all blog posts by default using thedisplay: "hidden"setting.