问题
I'm in the process of converting some of my company's documentation from .md to .rst to be displayed in ReadTheDocs.com
In some of these documents there are Internal sections that are not intended for our customers' consumption.
Is there a way to mark these sections such that Sphinx doesn't render it into HTML?
回答1:
Use the ifconfig directive.
In your docs:
.. ifconfig:: internal
This stuff is only included in the built docs for internal versions.
In your conf.py
's setup
function:
def setup(app):
app.add_config_value('internal', '', 'env')
来源:https://stackoverflow.com/questions/49701524/private-sections-of-text-possible-in-restructuredtext-files