Prevents menu links returning 404 when staging PRs #42

Merged
stb merged 2 commits from relative-paths-staging into main 2025-11-17 17:09:35 +01:00
Collaborator

Managed to reproduce the issue with staging PRs, where menu links return 404 by running hugo serve -b http://localhost:1313/pr123:

image image

The zen theme uses href="{{ .URL | relLangURL }}" by default: https://github.com/frjo/hugo-theme-zen/blob/main/layouts/_partials/menu.html#L5
Replacing it with href="{{ .URL }}" resolves the issue.

Managed to reproduce the issue with staging PRs, where menu links return 404 by running `hugo serve -b http://localhost:1313/pr123`: | | | | - | - | | ![image](/attachments/0654b1c7-0b03-4264-9649-096338570c72) | ![image](/attachments/68fafc2f-94c4-4aaf-886b-1e6762e83713) | The `zen` theme uses `href="{{ .URL | relLangURL }}"` by default: https://github.com/frjo/hugo-theme-zen/blob/main/layouts/_partials/menu.html#L5 Replacing it with `href="{{ .URL }}"` resolves the issue.
fix: Prevents menu 404 links when staging PRs
All checks were successful
/ build (pull_request) Successful in 27s
1fbdf9d082
You can view your changes at https://staging.hackertours.hamburg.ccc.de/pr42/
ViMaSter changed title from Prevents menu 404 links when staging PRs to Prevents menu links returning 404 when staging PRs 2025-11-12 19:25:29 +01:00
fix: Applies bugfix to mobile version of menu
All checks were successful
/ build (pull_request) Successful in 27s
/ cleanup-staging (pull_request) Successful in 2s
/ build (push) Successful in 18s
86fea9f42f
stb approved these changes 2025-11-17 17:09:26 +01:00
stb left a comment
Owner

LGTM

LGTM
stb merged commit 86fea9f42f into main 2025-11-17 17:09:35 +01:00
ViMaSter deleted branch relative-paths-staging 2025-11-17 17:29:40 +01:00
Sign in to join this conversation.
No reviewers
stb
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
CCCHH/hackertours!42
No description provided.