Allow the bug title to be customisable

Some projects using openstackdocstheme may wish to customise
the default bug title to be better suited to their needs.

This patch implements the ability to do so.

To define it, add the variable to html_context in the Sphinx
conf.py.

For example:
  html_context = {"bug_title": 'Documentation bug', ...}

Change-Id: Id62debd50fe0499ace809dde626cd8a357dbf933
This commit is contained in:
Jesse Pretorius 2016-07-06 15:45:20 +01:00
parent ebf3a775ba
commit 13bd97688a
2 changed files with 18 additions and 1 deletions

View File

@ -41,7 +41,11 @@
{%- else %}
var bugProject = "openstack-manuals";
{%- endif %}
{%- if bug_title %}
var bugTitle = "{{ bug_title }}";
{%- else %}
var bugTitle = "{{ title }} in {{ project }}";
{%- endif %}
var fieldTags = "{{ bug_tag }}";
/* "last_updated" is the build date and time. It relies on the

View File

@ -0,0 +1,13 @@
---
features:
- |
The ability to customise the bug title for the 'Report a Bug'
link is now available. To customise the bug title used add
the ``bug_title`` key with a value to ``html_context`` in the
Sphinx configuration.
For example:
::
html_context = {"bug_title": 'Documentation bug', ...}