Skip to content

Commit c7f9238

Browse files
committed
add docs for html-no plot
1 parent 98123ce commit c7f9238

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

doc/source/how-to/documenting.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,34 @@ Because these examples are built using Sphinx-Gallery, you must follow its codin
260260

261261
:ref:`General example` uses Python and Sphinx-Gallery.
262262

263+
Generate documentation without examples
264+
+++++++++++++++++++++++++++++++++++++++
265+
266+
Some of the PyAnsys repositories contains examples which are generated with the help
267+
of Ansys products. Building documentation locally is time consuming in these cases,
268+
particularly if you need to test changes only in the documentation excluding the examples.
269+
270+
To generate documentation without examples, use command ``make html-noplot`` with
271+
appropriate changes in ``make.bat`` and ``Makefile``. Change needed for ``Makefile``
272+
is mentioned below. Refer `sphinx-gallery documentation
273+
<https://sphinx-gallery.github.io/stable/configuration.html#building-without-executing-examples>`_.
274+
275+
.. code:: shell
276+
277+
html-noplot:
278+
$(SPHINXBUILD) -D plot_gallery=0 -b html $(ALLSPHINXOPTS) $(SOURCEDIR) $(BUILDDIR)/html
279+
@echo
280+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
281+
282+
Alternatively, you can modify ``sphinx_gallery_conf`` in ``conf.py`` as shown below
283+
284+
.. code:: Python
285+
286+
sphinx_gallery_conf = {
287+
...
288+
'plot_gallery': 'False',
289+
}
290+
263291
Generate documentation from docstrings
264292
--------------------------------------
265293

0 commit comments

Comments
 (0)