diff --git a/doc/source/index.rst b/doc/source/index.rst index 06f2c45..93966be 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -51,13 +51,22 @@ Using the theme ``bug_project`` The project name or ID. For launchpad, it's a string like - ``python-glanceclient``. If your project uses - ``storyboard.openstack.org``, use the project number instead like - ``901``. If unspecified, the "Report a bug" links are not shown. + ``python-glanceclient``. If unspecified, the "Report a bug" + links are not shown. + + If your project uses ``storyboard.openstack.org``, it's a + string like ``openstack-ci`` for the project group. + + ..note:: Previously StoryBoard showed numbers, and thus you set + this to a project number instead like ``901``. Set this to a + string instead and also use the ``use_storyboard`` variable. ``bug_tag`` Launchpad bug tag. If unspecified, no tag is set. The default is empty. + ``use_storyboard`` + Set to ``True`` if using StoryBoard. + One example for a project using launchpad:: # openstackdocstheme options @@ -65,11 +74,11 @@ Using the theme bug_project = 'python-glanceclient' bug_tag = '' - One example for a project using storyboard:: + One example for a project using StoryBoard:: # openstackdocstheme options repository_name = 'openstack-infra/infra-manual' - bug_project = '721' + bug_project = 'openstack-ci' bug_tag = '' #. Remove the options that will be automatically configured by the theme. diff --git a/openstackdocstheme/ext.py b/openstackdocstheme/ext.py index ee6eb79..551f08c 100644 --- a/openstackdocstheme/ext.py +++ b/openstackdocstheme/ext.py @@ -125,6 +125,11 @@ def _html_page_context(app, pagename, templatename, context, doctree): bug_project = app.config.bug_project if bug_project: _html_context_data['bug_project'] = bug_project + use_storyboard = app.config.use_storyboard + if bug_project and use_storyboard: + _html_context_data['use_storyboard'] = use_storyboard + # Previously storyboard showed numbers that were used, keep + # for old conf.py files: if bug_project and bug_project.isdigit(): _html_context_data['use_storyboard'] = True bug_tag = app.config.bug_tag @@ -292,6 +297,7 @@ def setup(app): app.add_config_value('bug_project', '', 'env') app.add_config_value('bug_tag', '', 'env') app.add_config_value('openstack_projects', [], 'env') + app.add_config_value('use_storyboard', '', 'env') app.add_html_theme( 'openstackdocs', os.path.abspath(os.path.dirname(__file__)) + '/theme/openstackdocs', diff --git a/releasenotes/notes/storyboard-string-643a47e957b64557.yaml b/releasenotes/notes/storyboard-string-643a47e957b64557.yaml new file mode 100644 index 0000000..101b4f2 --- /dev/null +++ b/releasenotes/notes/storyboard-string-643a47e957b64557.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Storyboard shows now instead of numbers the name of the project group. + Allow setting this as string. In this case the variable + ``use_storyboard`` needs to be set.