Skip to content

Commit

Permalink
Add :orphan: tag to apidocs/modules.rst to avoid warnings during the
Browse files Browse the repository at this point in the history
docs build.
  • Loading branch information
Kami committed Aug 8, 2023
1 parent d7f0a8b commit 6b23b7b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,21 @@
]


def add_orphan_tag_to_apidocs(app, docname, source):
"""
Add :orphan: tag to apidocs/modules.rst file to avoid errors during docs build.
"""

if docname == "apidocs/modules":
source[0] = ":orphan:" + "\n\n" + source[0]


# Taken and based from code in the sphinx project (BSD 2.0 license)
# https://github.com/sphinx-doc/sphinx/blob/master/doc/conf.py
def linkify_issues_in_changelog(app, docname, source):
"""Linkify issue references like #123 in changelog to GitHub."""
"""
Linkify issue references in changelog to GitHub and Jira.
"""

if docname == "changelog":
changelog_path = os.path.join(BASE_DIR, "../CHANGES.rst")
Expand Down Expand Up @@ -361,3 +372,4 @@ def run_apidoc(_):
def setup(app):
app.connect("builder-inited", run_apidoc)
app.connect("source-read", linkify_issues_in_changelog)
app.connect("source-read", add_orphan_tag_to_apidocs)

0 comments on commit 6b23b7b

Please sign in to comment.