Use metadata summary instead name for doc title
hint: ugly name like openstackdocumentationcontributorguide breaks the page layout. depends on the count of words and the length of the name it will use name or summary. Change-Id: Id3488cfab61be5791c34f4f4330087627e7b9719
This commit is contained in:
parent
bbc7a2a2e1
commit
445e7c1347
|
@ -184,9 +184,14 @@ def _get_project_name(srcdir):
|
|||
return None
|
||||
|
||||
try:
|
||||
# for project name we use the name in setup.cfg, but if the
|
||||
# length is longer then 32 we use summary. Otherwise thAe
|
||||
# menu rendering looks brolen
|
||||
project = parser.get('metadata', 'name')
|
||||
if len(project.split()) == 1 and len(project) > 32:
|
||||
project = parser.get('metadata', 'summary')
|
||||
except configparser.Error:
|
||||
logger.info('Could not extract project name from setup.cfg')
|
||||
logger.info('Could not extract project metadata from setup.cfg')
|
||||
return None
|
||||
_project = project
|
||||
return _project
|
||||
|
|
Loading…
Reference in New Issue