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 relative linking to menu item template and remove base url from header template #84

Merged
merged 1 commit into from
Jun 24, 2020

Conversation

jsigee87
Copy link
Contributor

This PR fixes a relative URL issue that causes the following behavior:

  • When deploying to a test location, the base URL of the test location is overwritten by the baseURL that is loaded into the <base> tag. This is solved by removing the line of HTML that generates that tag in the header.html template.
  • When deploying in any environment, footnotes do not work. The generated footnote links are relative and so are appended to the base URL and the user is redirected to e.g. https://mybaseurl.com/#fn:1. Removing the base URL fixes this issue as well.
  • When deploying to a test location, after clicking a menu item on the main page you are brought to a list of posts. Clicking on a post redirects the user to e.g. https://www.mybaseurl.com/menuitem/post instead of test-location/menuitem/post. This is fixed by changing the line in li.html to have .RelPermalink instead of .Permalink.

@jsigee87
Copy link
Contributor Author

Thanks!

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