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

Use of sphinx open directive for conditional content #1290

Open
tobydriscoll opened this issue Apr 5, 2021 · 1 comment
Open

Use of sphinx open directive for conditional content #1290

tobydriscoll opened this issue Apr 5, 2021 · 1 comment

Comments

@tobydriscoll
Copy link
Contributor

Not sure if this is a feature request, bug report, or just ignorance.

I'm writing a book and was planning to use only directives to include content only when a "solutions" tag is set. In Sphinx you set these tags by a command line flag, or by a tags.add('solutions') in conf.py.

However, I'm not seeing any way to enact either option within JB. I can add tags to the config file, put that does not put it into the proper syntax for Sphinx. For example,

sphinx:
  config:
    tags: [solutions]

produces the line

tags = ['solutions']

from jb config sphinx, but then building gives the error

WARNING: unknown config value 'tags' in override, ignoring

and the only content is still ignored.

@choldgraf
Copy link
Member

choldgraf commented Apr 13, 2021

Ah interesting - there are definitely something you can do in Sphinx that you cannot do with YAML configuration (what Jupyter Book uses). That I think is the issue here :-/ if this is really important, you could try building your book entirely with sphinx?

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

2 participants