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

html_context is always overriden #303

Closed
shimizukawa opened this issue Jan 2, 2015 · 2 comments
Closed

html_context is always overriden #303

shimizukawa opened this issue Jan 2, 2015 · 2 comments
Labels

Comments

@shimizukawa
Copy link
Member

in the the docs - http://sphinx.pocoo.org/templating.html?highlight=html_context - it is implied that one can set a variable called html_context so as to provide context variables to your templates. However, AFAICT, one cannot. One may //only// provide template context through command line switches, since in cmdline.py, html_context is always set to be an empty dictionary and passed in as an override.

Is this an error in documentation, or in code? I can try to provide a patch for either when I have a moment spare. FWIW, I'd prefer to pass in options to the html_context in conf.py as well as as a command line switch, as storing command-line options in a Makefile instead of conf.py feels wrong.


@shimizukawa
Copy link
Member Author

From dan mackinlay on 2009-12-31 02:20:40+00:00

It turns out the fix for this is almost trivial, and I needed it in a hurry, so I've created a patch which solves the issue for me. I don't expect this to be accepted - there are no tests nor is the documentation problem fixed. But if you get a chance to look in and let me know if I'm on the right track, that would be great.

@shimizukawa
Copy link
Member Author

From Georg Brandl on 2009-12-31 08:48:25+00:00

A patch always helps :) I couldn't find negative effects, so I added a test and committed in <<cset 0967259>>. Thanks!

jakobandersen pushed a commit to jakobandersen/sphinx that referenced this issue Feb 8, 2015
Add :numref: role to refer figures, tables and code-blocks by its fignum
jakobandersen pushed a commit to jakobandersen/sphinx that referenced this issue Feb 8, 2015
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant