Skip to content
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

Add custom alias template to fix redirects #77

Merged
merged 2 commits into from
Mar 13, 2024
Merged

Add custom alias template to fix redirects #77

merged 2 commits into from
Mar 13, 2024

Conversation

TobiasBabin
Copy link
Contributor

Thank you for submitting this pull request! We appreciate you spending the time to work on these changes.

What is the motivation?

The recent page restructurings introduced page redirects to continue serving the pre-existing URLs. Those redirects, implemented as Hugo alias entries, do not work properly and consistently link to a http://localhost... address.

What does this change do?

The change introduces a custom alias template as per the official documentation. It makes sure that the relative link is used at all times for redirects.

What is your testing strategy?

I inspected the index.html files that Hugo generates for each redirect location. Where previously the redirect target was an absolute URL http://localhost:1313/some/page..., it is now a relative URL /some/page.

Have you read the Contributing Guidelines?

Copy link
Contributor

@sujaya-sys sujaya-sys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TobiasBabin TobiasBabin merged commit 2e6cc17 into main Mar 13, 2024
1 check passed
@TobiasBabin TobiasBabin deleted the fix-aliases branch March 13, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants