diff --git a/tools/www-generator.py b/tools/www-generator.py index 6bcb2a0cef..8896e65692 100755 --- a/tools/www-generator.py +++ b/tools/www-generator.py @@ -176,53 +176,62 @@ def _check_url(args): # a file list generated by the web server. URLSettings = collections.namedtuple( 'URLSettings', - ['flag_name', 'types', 'template'], + ['flag_name', 'types', 'template', 'default'], ) _URLS = [ URLSettings( - flag_name=None, + flag_name='has_project_guide', types=[], template='https://docs.openstack.org/{name}/{series}/index.html', + default=True, ), URLSettings( flag_name='has_install_guide', types=['service'], template='https://docs.openstack.org/{name}/{series}/install/index.html', # noqa + default=False, ), URLSettings( flag_name='has_admin_guide', types=['service'], template='https://docs.openstack.org/{name}/{series}/admin/index.html', + default=False, ), URLSettings( flag_name='has_config_ref', types=['service', 'library'], template='https://docs.openstack.org/{name}/{series}/configuration/index.html', # noqa + default=False, ), URLSettings( flag_name='has_in_tree_api_docs', types=['service'], template='https://docs.openstack.org/{name}/{series}/api/index.html', + default=False, ), URLSettings( flag_name='has_user_guide', types=['service'], template='https://docs.openstack.org/{name}/{series}/user/index.html', + default=False, ), URLSettings( flag_name='has_api_ref', types=['service'], template='https://developer.openstack.org/api-ref/{service_type}/index.html', # noqa + default=False, ), URLSettings( flag_name='has_api_guide', types=['service'], template='https://developer.openstack.org/api-guide/{service_type}/index.html', # noqa + default=False, ), URLSettings( flag_name='has_deployment_guide', types=['deployment'], template='https://docs.openstack.org/project-deploy-guide/{name}/{series}/index.html', # noqa + default=False, ), ] @@ -330,10 +339,8 @@ def load_project_data(source_directory, ) if check_links_this_project and not skip_links: for url_info in _URLS: - if url_info.flag_name is None: - flag_val = True - else: - flag_val = project.get(url_info.flag_name, False) + flag_val = project.get(url_info.flag_name, + url_info.default) if ((not flag_val) and url_info.types and project_type not in url_info.types): diff --git a/www/project-data/schema.yaml b/www/project-data/schema.yaml index 4edf4be444..b37f6e6879 100644 --- a/www/project-data/schema.yaml +++ b/www/project-data/schema.yaml @@ -48,3 +48,5 @@ items: type: boolean has_deployment_guide: type: boolean + has_project_guide: + type: boolean