Skip to content

Conversation

@StarryReverie
Copy link
Contributor

@StarryReverie StarryReverie commented Apr 8, 2025

When the website is configured with baseURL = "https://example.com/sub-website/", the current link render hook will turn [](/some/link) to <a href="https://example.com/some/link"></a> rather than <a href="https://example.com/sub-website/some/link"></a>. A real-world example is the theme's documentation website, where a link with a title of Organize File will be redirected to the 404 page. This PR fixes this problem. Note that merging this will introduce a breaking change, but I personally think that this makes sense, in that the Hextra theme haven't published a major release ever since.

By the way, in my last PR #657, I mistakenly used ? for URL fragments. The fix is rather apparent, which is only a one-character substitution, so I put it along with this PR for convenience and simplicity. Apology for my carelessness.

@netlify
Copy link

netlify bot commented Apr 8, 2025

Deploy Preview for hugo-hextra ready!

Name Link
🔨 Latest commit 2e88202
🔍 Latest deploy log https://app.netlify.com/sites/hugo-hextra/deploys/67f51a2f65f20a00082f9d00
😎 Deploy Preview https://deploy-preview-660--hugo-hextra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@imfing imfing mentioned this pull request Apr 9, 2025
@imfing
Copy link
Owner

imfing commented Apr 9, 2025

@oosquare thank you for the fix

where a link with a title of Organize File will be redirected to the 404 page. This PR fixes this problem.

I agree that respecting the baseURL makes more sense 👍

@imfing imfing merged commit 1eb4b9e into imfing:main Apr 9, 2025
4 checks passed
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