Skip to content

Overriding layout.html #1722

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

Closed
miohtama opened this issue Oct 1, 2015 · 5 comments
Closed

Overriding layout.html #1722

miohtama opened this issue Oct 1, 2015 · 5 comments

Comments

@miohtama
Copy link

miohtama commented Oct 1, 2015

I am using RTD.org theme with Sphinx. I manage to override layout.html locally using the Sphinx default _templates override path.

          html_theme = "sphinx_rtd_theme"

          html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

          # Add any paths that contain templates here, relative to this directory.
          templates_path = ['_templates']

However when deployed on RTD.org changes do not appear there.

What (special) actions I need to take on conf.py et. al. so that my custom layout.html is picked up on RTD.org deployment instead of the default RTD.org one?

@agjohnson
Copy link
Contributor

We recently started outputting the conf.py that we use, after appending our changes to the file. You can see the output in the build output page, under cat conf.py. This might offer some more clues. This may be a result of us clobbering the html_theme_path, where we should be appending.

@agjohnson agjohnson added the Support Support question label Oct 5, 2015
@miohtama
Copy link
Author

miohtama commented Oct 5, 2015

Thanks! Will check this out.

@miohtama
Copy link
Author

miohtama commented Oct 9, 2015

The build page layout is broken. I think I cannot read cat build.py - should I open a new issue for this? FF / OSX..

screen shot 2015-10-09 at 16 27 48

@miohtama
Copy link
Author

miohtama commented Oct 9, 2015

Ok could read it with Chrome.

I think it unconditionally inserts RTD internal templates at the front of my templates:

#Add RTD Template Path.
if 'templates_path' in globals():
    templates_path.insert(0, '/home/docs/checkouts/readthedocs.org/readthedocs/templates/sphinx')
else:
    templates_path = ['/home/docs/checkouts/readthedocs.org/readthedocs/templates/sphinx', 'templates', '_templates',
                      '.templates']

Any way to fix this? Can I include conf.py code after RTD.org mangles conf.py?

@ericholscher
Copy link
Member

This is a dupe of #152

@ericholscher ericholscher added Status: duplicate and removed Support Support question labels Jan 30, 2016
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

3 participants