fix: replaced floating relative URLs with ones affixed to root #378
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 it fixes
Fixes navigation issues after opening pages from external websites
Source of the issue
Forward slash character (
/
) gets appended every time a page is visited on the hacs.xyz website. Therefore clicking URLs with no forward slash in the beginning will cause their target to be appended to the end of the current URL.Edit: To be clear, this only occurs when the starting URL (
https://hacs.xyz/docs/publish/start
in the example below) is visited directly due to Javascript code not appending a trailing slash whenever navigation is performed.Steps to reproduce
https://hacs.xyz/docs/publish/start
)https://hacs.xyz/docs/publish/start
Enter
keyhttps://hacs.xyz/docs/publish/start
->https://hacs.xyz/docs/publish/start/
(a forward slash gets appended)