Skip to content

Commit

Permalink
Conditionalize pbori documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Oct 7, 2023
1 parent c6be856 commit ff00c0d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/doc/en/reference/polynomial_rings/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ Infinite Polynomial Rings
Boolean Polynomials
-------------------

.. toctree::
:maxdepth: 1
..only:: feature_sage_rings_polynomial_pbori

.. toctree::
:maxdepth: 1

sage/rings/polynomial/pbori/pbori
sage/rings/polynomial/pbori/pbori

.. include:: ../footer.txt
.. include:: ../footer.txt
8 changes: 8 additions & 0 deletions src/sage_docbuild/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from sage.env import SAGE_DOC_SRC, SAGE_DOC, THEBE_DIR, PPLPY_DOCS, MATHJAX_DIR
from sage.misc.latex_macros import sage_mathjax_macros
from sage.features import PythonModule
from sage.features.all import all_features

# General configuration
# ---------------------
Expand Down Expand Up @@ -940,3 +941,10 @@ def setup(app):
app.connect('missing-reference', find_sage_dangling_links)
app.connect('builder-inited', nitpick_patch_config)
app.connect('html-page-context', add_page_context)


# Conditional content
# https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#tags
# https://www.sphinx-doc.org/en/master/usage/configuration.html#conf-tags
for feature in all_features():
tags.add('feature_' + feature.name.replace('.', '_'))

0 comments on commit ff00c0d

Please sign in to comment.