sphinx: exclude *.inc.rst files

Sections like "Synopsis" wrongly show up in the toctree in
build/user_doc/html/commands.html.  Skip them.
This commit is contained in:
Johannes Altmanninger
2025-11-23 11:49:36 +01:00
parent 7ca78e7178
commit 6fa992c8d3
2 changed files with 3 additions and 3 deletions

View File

@@ -162,7 +162,8 @@ language = "en"
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
fish_exclude_patterns = "cmds/*.inc.rst"
exclude_patterns = [fish_exclude_patterns]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None
@@ -265,7 +266,7 @@ man_pages = [
),
("faq", "fish-faq", "", [author], 1),
]
for path in sorted(set(glob("cmds/*.rst")) - set(glob("cmds/*.inc.rst"))):
for path in sorted(set(glob("cmds/*.rst")) - set(glob(fish_exclude_patterns))):
docname = os.path.splitext(path)[0]
cmd = os.path.basename(docname)
man_pages.append((docname, cmd, get_command_description(path, cmd), "", 1))

View File

@@ -56,7 +56,6 @@ cmds/fish_status_to_signal
cmds/fish_svn_prompt
cmds/fish_tab_title
cmds/fish_title
cmds/fish_title.inc
cmds/fish_update_completions
cmds/fish_vcs_prompt
cmds/fish_vi_key_bindings