From 852db7a9e2dca548bb67eec8a0fbd8145fe75187 Mon Sep 17 00:00:00 2001 From: Dougal Matthews <dougal@redhat.com> Date: Tue, 1 Mar 2016 12:13:22 +0000 Subject: [PATCH] Add the service type to the project page title This has the advantage of including the service type in the list of projects which gives readers some extra context in an otherwise potentially bewildering list of names. Change-Id: Icf6a644d283368f957b978fa4321800d15f38f3e --- doc/source/_exts/teams.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/source/_exts/teams.py b/doc/source/_exts/teams.py index 410673dc2..580947cb6 100644 --- a/doc/source/_exts/teams.py +++ b/doc/source/_exts/teams.py @@ -25,11 +25,17 @@ IRC_LOG_URL_BASE = 'http://eavesdrop.openstack.org/irclogs/%23' def _team_to_rst(name, info): + + if 'service' in info: + title = "{0} ({1})".format(name.title(), info['service']) + else: + title = name.title() + yield '.. _project-%s:' % projects.slugify(name) yield '' - yield '=' * len(name) - yield name.title() - yield '=' * len(name) + yield '=' * len(title) + yield title + yield '=' * len(title) yield '' yield ':Home Page: ' + info.get('url', '') ptl = info.get('ptl', {'name': '', 'irc': ''})