Make root title customizable
The theme displays "OpenStack Docs:" in the title and "Docs home" in the tooltip, which makes it hard to reuse for other websites (including the governance website). This patch makes the root title ("OpenStack Docs" by default) configurable. Change-Id: I4140f62a328debf81703cddd17dd6364b5eab479
This commit is contained in:
parent
39e7704612
commit
034683f12d
|
@ -158,6 +158,16 @@ can be disabled with the ``display_badge`` html theme option::
|
|||
# ...
|
||||
}
|
||||
|
||||
If you are using this theme for something other than docs.openstack.org,
|
||||
you can customize the root title ("OpenStack Docs") that appears in the
|
||||
page title and the left arrow tooltip::
|
||||
|
||||
html_theme_options = {
|
||||
# ...
|
||||
"root_title": "OpenStack Governance",
|
||||
# ...
|
||||
}
|
||||
|
||||
External Link Helper
|
||||
--------------------
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
|
||||
{% block header %}{% endblock %}
|
||||
<title>OpenStack Docs: {{ title|striptags }}</title>
|
||||
<title>{{ root_title|striptags }}: {{ title|striptags }}</title>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="col-lg-3 col-md-4 col-sm-4 col-lg-pull-9 col-md-pull-8 col-sm-pull-8 docs-sidebar">
|
||||
<div class="btn-group docs-sidebar-releases">
|
||||
<button onclick="location.href='/'" class="btn docs-sidebar-home" data-toggle="tooltip" data-placement="top" title="Docs Home"><i class="fa fa-arrow-circle-o-left"></i></button>
|
||||
<button onclick="location.href='/'" class="btn docs-sidebar-home" data-toggle="tooltip" data-placement="top" title="{{ root_title|striptags }} Home"><i class="fa fa-arrow-circle-o-left"></i></button>
|
||||
|
||||
{%- if theme_sidebar_dropdown == 'api_ref' %}
|
||||
{% include 'sidebartoc_menu_apiref.html' %}
|
||||
|
|
|
@ -8,6 +8,7 @@ analytics_tracking_code = UA-17511903-1
|
|||
sidebar_mode = toctree
|
||||
display_badge = True
|
||||
display_toc = True
|
||||
root_title = OpenStack Docs
|
||||
sidebar_dropdown = os_docs
|
||||
show_other_versions = False
|
||||
earliest_published_series = mitaka
|
||||
|
|
Loading…
Reference in New Issue