Prevents menu links returning 404 when staging PRs #42

Open
ViMaSter wants to merge 2 commits from relative-paths-staging into main
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
86fea9f42f
All checks were successful
/ build (pull_request) Successful in 27s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin relative-paths-staging:relative-paths-staging
git switch relative-paths-staging

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff relative-paths-staging
git switch relative-paths-staging
git rebase main
git switch main
git merge --ff-only relative-paths-staging
git switch relative-paths-staging
git rebase main
git switch main
git merge --no-ff relative-paths-staging
git switch main
git merge --squash relative-paths-staging
git switch main
git merge --ff-only relative-paths-staging
git switch main
git merge relative-paths-staging
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 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.