Fix broken menu page links - #6
Merged
Merged
Conversation
Two links on /menu/ returned 404: - The breadcrumb linked up to /menus/ (the menus collection index the template expects), but that page was never created. Add pages/menus.md at /menus/ listing the menu so the breadcrumb resolves. - The "Download The Menu PDF" button used the menu-pdf-download block, which emits a relative href assuming the page lives at /menus/menu/. Because this page overrides its permalink to /menu/, the link resolved to /menu/feed-cafe-and-deli-menu.pdf (404). The PDF is generated at /menus/menu/feed-cafe-and-deli-menu.pdf, so use a link-button with that absolute path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HrgAeaLAgXkVeDwzJWPNLi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Two links on
/menu/returned 404 (reported by a link checker):https://www.feedstives.co.uk/menus//menu/https://www.feedstives.co.uk/menu/feed-cafe-and-deli-menu.pdf/menu/Both stem from
menus/menu.mdoverriding its permalink to/menu/, while the template assumes menu pages live at the default/menus/<slug>/.Changes
Add
pages/menus.mdat/menus/. The template's breadcrumb links menu pages up to their collection index/menus/, but this site never created that page, so the breadcrumb 404'd. The new page is a short index that lists the menu (no nav entry — it's reached via the breadcrumb).Fix the PDF download button in
menus/menu.md. Themenu-pdf-downloadblock emits a relative href (feed-cafe-and-deli-menu.pdf) that assumes the page sits at/menus/menu/. Because this page is at/menu/, the link resolved to/menu/feed-cafe-and-deli-menu.pdf(404). The PDF is actually generated and served at/menus/menu/feed-cafe-and-deli-menu.pdf(verified returns200 application/pdf), so the block is replaced with alink-buttonpointing at that absolute path.Notes
/menu/URL and all existing internal links to it are unchanged.🤖 Generated with Claude Code
Generated by Claude Code