From d8814304185ee02d4ff732db95c7299c395f3d2f Mon Sep 17 00:00:00 2001 From: KATO Tomoyuki Date: Sat, 21 Nov 2015 22:13:10 +0900 Subject: [PATCH] [autohelp] Add table label for RST reference Each table need to be markuped up for reference. In case the label is set at outside of inclusion, Sphinx can not properly treat the label. Change-Id: I2257471300ca5752ba717858a14d4fa26f62916f --- autogenerate_config_docs/autohelp.py | 1 + autogenerate_config_docs/templates/autohelp.rst.j2 | 2 ++ 2 files changed, 3 insertions(+) diff --git a/autogenerate_config_docs/autohelp.py b/autogenerate_config_docs/autohelp.py index 282ebb40..73d65b17 100755 --- a/autogenerate_config_docs/autohelp.py +++ b/autogenerate_config_docs/autohelp.py @@ -403,6 +403,7 @@ def write_files(package_name, options, target, output_format): items.append(item) env['items'].append(items) + env['table_label'] = package_name + '-' + cat ext = 'rst' if output_format == 'rst' else 'xml' file_path = ("%(target)s/%(package_name)s-%(cat)s.%(ext)s" % diff --git a/autogenerate_config_docs/templates/autohelp.rst.j2 b/autogenerate_config_docs/templates/autohelp.rst.j2 index 23e0a0d6..47028279 100644 --- a/autogenerate_config_docs/templates/autohelp.rst.j2 +++ b/autogenerate_config_docs/templates/autohelp.rst.j2 @@ -8,6 +8,8 @@ autogenerate-config-doc tool from the openstack-doc-tools repository, or ask for help on the documentation mailing list, IRC channel or meeting. +.. _{{ table_label }}: + .. list-table:: Description of {{ nice_cat }} configuration options :header-rows: 1 :class: config-ref-table