I have some documentation that needs to be generated twice:  Once for 
internal use, and another time for public release that excludes some 
information.

It seems that ifconfig is the way to achieve this.  My question is in two 
parts:

1)  Even with the example code, I can't get ifconfig to work.  In index.rst:

>  

> .. ifconfig:: audience == 'internal'
>   This is private!


In conf.py

def setup(app):
>     print 'Setup'
>     app.add_config_value('audience', 'internal', True)


But that renders as a scary box with the following text:

System Message: ERROR/3 (<redacted>/index.rst, line 8)
> Exception occured in ifconfig expression: NameError: name ‘audience’ is 
> not defined


What am I doing wrong?  I see "Setup" echoed in the console when I build, 
so I know that the add_config_value() is getting triggered.

2) How can I expose the config value so that I can choose the audience at 
build-time? (i.e., with an argument passed to sphinx-build.)

-- 
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/d/optout.

Reply via email to