Skip to content

Commit 26fcf36

Browse files
committed
Add some basic troubleshooting tips for the docs build
1 parent 548087d commit 26fcf36

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

docs/dev/Documentation.rst

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ with relevant tags. These are used to compile indices and generate cross-links b
6767
commands, both in the HTML documents and in-game. See the list of available `tag-list` and
6868
think about which categories your new tool belongs in.
6969

70+
.. _docs-links:
71+
7072
Links
7173
-----
7274

@@ -498,6 +500,48 @@ folder. Also be aware that when running ``sphinx-build`` directly, the
498500
``docs/html`` folder may be polluted with intermediate build files that normally
499501
get written in the cmake ``build`` directory.
500502

503+
Troubleshooting
504+
===============
505+
506+
Sphinx errors are typically printed by Sphinx, so ensure that you are not silencing Sphinx output.
507+
508+
When built with ``docs/build.py`` or CMake, errors are also logged to
509+
``build/docs/<format>/sphinx-warnings.txt`` (for instance, if you are building
510+
the HTML docs, ``build/docs/html/sphinx-warnings.txt``).
511+
512+
513+
"undefined label"
514+
-----------------
515+
516+
Typical causes:
517+
518+
* You have used single backticks for an inline code snippet, where double backticks should be used instead (see `docs-links`)::
519+
520+
`this is an invalid inline code snippet (actually a link)`
521+
``this is a valid inline code snippet``
522+
523+
* You are attempting to link to a section/label, but either it does not have a label defined or you have spelled it incorrectly::
524+
525+
.. my-label:
526+
527+
This is where the link should go to.
528+
529+
...
530+
531+
This is `a valid link to the earlier label <my-label>`. So is `my-label`.
532+
533+
"toctree contains reference to document that doesn't have a title"
534+
------------------------------------------------------------------
535+
536+
Due to the nature of our autogenerated documentation, this can sometimes occur
537+
when switching between branches that have different autogenerated files, and can
538+
result in autogenerated documentation (e.g. for individual tools) being missing
539+
from the table of contents, or links failing to generate.
540+
541+
The quickest resolution is a clean docs build::
542+
543+
docs/build.py --clean
544+
501545
.. _build-changelog:
502546

503547
Building the changelogs

0 commit comments

Comments
 (0)