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

Missing BaseURL in header and footer partials #2

Closed
ssemigr opened this issue May 9, 2016 · 2 comments
Closed

Missing BaseURL in header and footer partials #2

ssemigr opened this issue May 9, 2016 · 2 comments

Comments

@ssemigr
Copy link

ssemigr commented May 9, 2016

While playing with the theme, I noticed that in header.html and footer.html partials the addresses for css and js files are absolute, which breaks the page when deploying on an external webserver.
Easy fix is to change
<script src="/js/hugo-academic.js"></script>
to
<script src="{{ $.Site.BaseURL }}js/hugo-academic.js"></script>
et cetera

@gcushen
Copy link
Collaborator

gcushen commented May 9, 2016

Thank you for reporting this bug with non-root base URLs. (Otherwise, the assets should load fine if deployed with the baseurl setting defined for the domain root e.g. baseurl = http://www.example.org/.)

Commit a55f766 should fix this issue for the main asset URLs. I am now checking if any general links can be fixed/improved.

@gcushen
Copy link
Collaborator

gcushen commented May 11, 2016

In addition to a55f766, commits f73f7ae and 5c23d6b should fully resolve any issues when the baseurl is not set to the domain root.

@gcushen gcushen closed this as completed May 11, 2016
EoinTravers added a commit to EoinTravers/hugo-academic that referenced this issue Jun 8, 2020
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

No branches or pull requests

2 participants