Hi Michael,

I wrote your code snippets in my conf.py and wrote a layout.html
template to use {{page}} variable, it works fine. I got an html file
with "PAGE" string.

Why do you think "The context variable is immutable"?

Regards,
--
Takayuki SHIMIZUKAWA
http://about.me/shimizukawa


2013/7/10 Michael Lustfield <[email protected]>:
> I'm trying to write a module for sphinx to render some text correctly. It's
> a bit of a wild project I'm working on, but....
>
> I have this in my module.py file.
>
>     def ngx_modify(app, pagename, templatename, context, doctree):
>         context['page'] = 'PAGE'
>
>
>     def setup(app):
>         app.connect('html-page-context', ngx_modify)
>
> The context variable is immutable, so I can't make changes to it the way I
> put in there. I need to alter the rendered page before it finally makes it
> to the output. How can I do this?
>
> --
> You received this message because you are subscribed to the Google Groups
> "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to