diff --git a/Makefile b/Makefile index 0815ade564c..2e123d225b2 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,9 @@ docs: ## Generate HTML documentation. $(IN_VENV) $(MAKE) -C doc clean $(IN_VENV) $(MAKE) -C doc html +rebuild-docs: ## Re-generate HTML documentation without clean step. + $(IN_VENV) $(MAKE) -C doc html + setup-venv: if [ ! -f $(VENV)/bin/activate ]; then bash scripts/common_startup.sh --dev-wheels; fi diff --git a/doc/source/conf.py b/doc/source/conf.py index d44ee73b861..b2add06a301 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -18,6 +18,10 @@ import sphinx_rtd_theme # Library to make .md to slideshow from recommonmark.transform import AutoStructify +# Set GALAXY_DOCS_SKIP_VIEW_CODE=1 to skip embedding highlighted source +# code into docs. +SKIP_VIEW_CODE = os.environ.get("GALAXY_DOCS_SKIP_VIEW_CODE", False) == "1" + # Set GALAXY_DOCS_SKIP_SOURCE=1 to skip building source information and # just build primary documentation. (Quicker to debug issues in most frequently updated # docs). @@ -43,7 +47,9 @@ sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), os.pa extensions = ['recommonmark', 'sphinx.ext.intersphinx', 'sphinx_markdown_tables'] if not SKIP_SOURCE: # TODO: Add https://pypi.org/project/sphinx-autodoc-typehints - extensions += ['sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinx.ext.autodoc'] + extensions += ['sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.autodoc'] + if not SKIP_VIEW_CODE: + extensions.append('sphinx.ext.viewcode') # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates']