# phpman > man > dh_sphinxdoc(1)

[DH_SPHINXDOC(1)](https://www.chedong.com/phpMan.php/man/DHSPHINXDOC/1/markdown)                               Debhelper                              [DH_SPHINXDOC(1)](https://www.chedong.com/phpMan.php/man/DHSPHINXDOC/1/markdown)



## NAME
       dh_sphinxdoc - helps with packaging Sphinx-generated documentation

## SYNOPSIS
       dh_sphinxdoc [_debhelper_ _options_] [**-X**_item_] [_directory_...]

## DESCRIPTION
       **dh**___**sphinxdoc** is a debhelper program that prepares Sphinx-generated documentation for
       inclusion in a Debian package. More specifically:

       •   It checks if all the files referenced by _searchindex.js_ exist.

       •   It replaces known _*.js_ files with symlinks to _/usr/share/javascript/sphinxdoc/_ and
           generates **${sphinxdoc:Depends}** substitution variable.

       •   If the Sphinx RTD theme is used, it replaces known files from this theme with symlinks to
           _/usr/share/sphinx_rtd_theme/_, and adds **sphinx-rtd-theme-common** to **${sphinxdoc:Depends}**.

       •   It provides a **${sphinxdoc:Built-Using}** substitution variable, for tracking files which
           could not be symlinked. Examples of such files are _*.js_ and _*.css_ files that are
           generated from corresponding _*.js_t_ and _*.css_t_ templates, and can vary depending on the
           used theme options (for instance, _basic.css_ file is generated from _basic.css_t_ and is
           included in almost every Sphinx-generated documentation). Currently, this variable will
           contain **sphinx** and, if the default theme is used, **alabaster**, with their versions (other
           themes are not supported).

       •   It removes the _.doctrees_ directory.

       •   It removes the _.buildinfo_ file.

       •   It removes the _websupport.js_ file.

       Note that **dh**___**sphinxdoc** does not build the documentation, it only performs the above
       operations when the documentation is already installed into the package build path. To build
       the docs, please use [**sphinx-build**(1)](https://www.chedong.com/phpMan.php/man/sphinx-build/1/markdown) command or **python3** **-m** **sphinx** syntax.

       You can pass **--with** **sphinxdoc** to [**dh**(1)](https://www.chedong.com/phpMan.php/man/dh/1/markdown) to make it automatically call **dh**___**sphinxdoc** after
       **dh**___**installdocs**.

## OPTIONS
       _directory_
           By default, **dh**___**sphinxdoc** scans your package looking for directories looking like they
           contain Sphinx-generated documentation. However, if you explicitly provide one or more
           directories, only they will be processed. If documentation is not found at _directory_, an
           error is raised.

### -X --exclude=
           Exclude files that contain _item_ anywhere in their filename from being symlinked, removed
           or checked for existence.

## BUGS
       Symlinking translations.js is not supported.

## SEE ALSO
       [**debhelper**(7)](https://www.chedong.com/phpMan.php/man/debhelper/7/markdown), [**dh**(1)](https://www.chedong.com/phpMan.php/man/dh/1/markdown).

       This program is meant to be used together with debhelper.

## AUTHOR
       Jakub Wilk <<jwilk@debian.org>>



                                             2021-12-19                              [DH_SPHINXDOC(1)](https://www.chedong.com/phpMan.php/man/DHSPHINXDOC/1/markdown)
