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

modernizr is being requested relative to the page, not the site #1497

Closed
slaneyrw opened this issue Jul 29, 2015 · 3 comments · Fixed by #1500
Closed

modernizr is being requested relative to the page, not the site #1497

slaneyrw opened this issue Jul 29, 2015 · 3 comments · Fixed by #1500
Labels
Bug A bug

Comments

@slaneyrw
Copy link

I have noticed this on my local sphinx build, but also on some RTD hosted ( ie docs.asp.net ).

The layout.html page has a link...

<script src="_static/js/modernizr.min.js"></script>

This link is relative to the current page, so if you are creating folders in your documentation then the path to the modernizr file will move as well.

Example:

http://docs.asp.net/en/latest/getting-started/installing-on-windows.html
404: http://docs.asp.net/en/latest/getting-started/_static/js/modernizr.min.js

Is there a config setting that we can use to make this link absolute ?

@slaneyrw
Copy link
Author

I changed my local sphinx template to use

<script src="{{ pathto('_static/js/modernizr.min.js', 1) }}"></script>

It appears to work in my limited testing.

@gregmuellegger
Copy link
Contributor

Seems valid and is already fixed in the sphinx_rtd_theme repository. We should update the theme in RTD to fix this issue. I've created #1500 for this.

@gregmuellegger
Copy link
Contributor

That's fixed an will be live with the next deploy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants