Replies: 2 comments
-
When you get this warning, it normally means that your file is still processed and the set However, such conditional content handling can be done with the help of Jinja. There is also an implementation as an extension: |
Beta Was this translation helpful? Give feedback.
-
Keep in mind that the approach outlined by https://www.ericholscher.com/blog/2016/jul/25/integrating-jinja-rst-sphinx/ changes the file type of any affected file to be Jinja. This affects tools down the road that read the files as RST. |
Beta Was this translation helpful? Give feedback.
-
I am using the
needimport
directive to import needs fromneeds.json
. However, I would like this to be conditional, based on a variable inconf.py
. Is it possible to disable needimport globally somehow?I have a page called
need_import.rst
:The only way I can prevent the
needimport
being executed is by addingneed_import.rst
toexclude_patterns
in conf.py. This then generates the following:WARNING: document isn't included in any toctree
Is there a better method to do this?
Beta Was this translation helpful? Give feedback.
All reactions