The ifconfig extension allows you to conditionally include text. The exclusion takes a list of rst files and excludes them from the build.
The syntax of exclude_patterns is:
exclude_patterns = ['anrstfile.rst', 'directorypath/']
There is one niggle with this exclude; if there is a relative link to any excluded file, then exclude_patterns is ignored and the file is included.
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To post to this group, send email to sphin...@googlegroups.com.
To unsubscribe from this group, send email to sphinx-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
I need to be able to exclude specific rst files, depending on a built parameter.Is there an extension that will enable this?
>> I need to be able to exclude specific rst files, depending on a built
>> parameter.
You might try with a "condotional include" directive like
.. only:: ...
.. include:: foo.txt
> The right answer might very well be much more simply done with N different
> conf files, N different "contents" files, and a cunningly structured source
> tree to minimize duplication of source outside the conf and contents
> files... 8(
Maybe a version control system with good support for branches (git, ...)?
Günter
You might try with a "condotional include" directive like
.. only:: ...
.. include:: foo.txt
> The right answer might very well be much more simply done with N different
> conf files, N different "contents" files, and a cunningly structured source
> tree to minimize duplication of source outside the conf and contents
> files... 8(Maybe a version control system with good support for branches (git, ...)?