Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/.sphinx/_integration/add_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
html_css_files = globals().get('html_css_files', []) + ['override-header.css']
html_js_files = globals().get('html_js_files', []) + ['js/overwrite_microcloud_links.js']
tags.add('integrated')
# Prevent indexing of integrated docs
html_context['seo_noindex'] = True
elif project == "MicroCeph":
html_baseurl = "https://documentation.ubuntu.com/microceph/latest/"
# Override default header templates
Expand All @@ -25,9 +27,13 @@
html_js_files = globals().get('html_js_files', []) + ['overwrite_microcloud_links.js']
# Add "integrated" to the list of custom tags
tags.add('integrated')
# Prevent indexing of integrated docs
html_context['seo_noindex'] = True
elif project == "MicroOVN":
html_baseurl = "https://ubuntu.com/docs/microovn/latest/"
tags.add('integrated')
html_static_path = globals().get('html_static_path', []) + ["_static"]
# Add js to overwrite MicroCloud links
html_js_files = globals().get('html_js_files', []) + ['overwrite_microcloud_links.js']
# Prevent indexing of integrated docs
html_context['seo_noindex'] = True
9 changes: 9 additions & 0 deletions doc/.sphinx/_integration/microceph-base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% extends "!base.html" %}

{% block extrahead %}
{{ super() }}
{% if seo_noindex %}
{# Prevent indexing of integrated docs. #}
<meta name="robots" content="noindex">
{% endif %}
{% endblock %}
7 changes: 7 additions & 0 deletions doc/.sphinx/_integration/microovn-extrahead.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% block extrahead %}
{{ super() }}
{% if seo_noindex %}
{# Prevent indexing of integrated docs. #}
<meta name="robots" content="noindex">
{% endif %}
{% endblock %}
4 changes: 4 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ integrate:
cp _templates/google-tag.html integration/microovn/docs/.sphinx/_templates/
cp .sphinx/_integration/header.css integration/microovn/docs/.sphinx/_static/

# Set up `noindex` tags for MicroCeph and MicroOVN pages
cp .sphinx/_integration/microceph-base.html integration/microceph/docs/_templates/base.html
cat .sphinx/_integration/microovn-extrahead.html >> integration/microovn/docs/.sphinx/_templates/base.html
Comment on lines +116 to +118

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should be an issue for our build workflow, since the integrate target is only run once when building the documentation.


# Add information about where to find the tags/docs to the doc sets
cat .sphinx/_integration/add_config.py >> integration/lxd/doc/conf.py
cat .sphinx/_integration/add_config.py >> integration/microceph/docs/conf.py
Expand Down
Loading