Skip to content

doc: prevent indexing of integrated docs - #1475

Open
elijahgreenstein wants to merge 1 commit into
canonical:mainfrom
elijahgreenstein:noindex-integrated-docs
Open

doc: prevent indexing of integrated docs#1475
elijahgreenstein wants to merge 1 commit into
canonical:mainfrom
elijahgreenstein:noindex-integrated-docs

Conversation

@elijahgreenstein

Copy link
Copy Markdown
Contributor
  • Updates add_config.py to add seo_noindex context to the LXD, MicroCeph, and MicroOVN docs.
  • Sets up base.html file to add to the cloned MicroCeph docs
  • Sets up extrahead block to append to the cloned MicroOVN docs

Note that the LXD upstream docs already have a check for seo_noindex, so setting html['seo_noindex'] = True is sufficient to add the noindex tags.

Documentation on the extrahead block and super() is available here: https://www.sphinx-doc.org/en/master/development/html_themes/templating.html.

For comparison, noindex tags were added to the older LXD docs versions in canonical/lxd#17984.

Copilot AI review requested due to automatic review settings August 5, 2026 22:39
@elijahgreenstein elijahgreenstein changed the title docs: prevent indexing of integrated docs doc: prevent indexing of integrated docs Aug 5, 2026
@github-actions github-actions Bot added the Documentation Documentation needs updating label Aug 5, 2026
- Updates `add_config.py` to add `seo_noindex` context to the LXD,
  MicroCeph, and MicroOVN docs.
- Sets up base.html file to add to the cloned MicroCeph docs
- Sets up extrahead block to append to the cloned MicroOVN docs

Note that the LXD upstream docs already have a check for `seo_noindex`,
so setting `html['seo_noindex'] = True` is sufficient to add the noindex
tags.

Signed-off-by: Elijah Greenstein <elijah.greenstein@canonical.com>
@elijahgreenstein
elijahgreenstein force-pushed the noindex-integrated-docs branch from 2c31f97 to f44ef9d Compare August 5, 2026 22:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the documentation integration workflow to add noindex meta tags to integrated upstream docs (LXD, MicroCeph, MicroOVN) so search engines don’t index the embedded copies within MicroCloud’s documentation site.

Changes:

  • Set html_context['seo_noindex'] = True for integrated builds across LXD, MicroCeph, and MicroOVN via the integration config snippet.
  • Add a MicroCeph base.html override that injects a <meta name="robots" content="noindex"> when seo_noindex is enabled.
  • Append an extrahead block to MicroOVN’s base template to conditionally inject the same noindex meta tag.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
doc/Makefile Adds integration steps to install template overrides/injections for MicroCeph and MicroOVN noindex behavior.
doc/.sphinx/_integration/microovn-extrahead.html New Jinja snippet to inject noindex in MicroOVN docs via extrahead.
doc/.sphinx/_integration/microceph-base.html New base.html override for MicroCeph that injects noindex in extrahead.
doc/.sphinx/_integration/add_config.py Sets seo_noindex in html_context for integrated builds of LXD/MicroCeph/MicroOVN.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread doc/Makefile
Comment on lines +116 to +118
# 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

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.

Copilot AI review requested due to automatic review settings August 5, 2026 22:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (1)

doc/Makefile:118

  • cat ... >> integration/microovn/docs/.sphinx/_templates/base.html will silently create base.html if it doesn't exist, which can mask upstream template changes and lead to a broken/partial template without failing the integration step. It’s safer to assert the file exists (and optionally ensure a newline before appending) so the build fails loudly if the expected base template is missing.
	# 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

@elijahgreenstein

Copy link
Copy Markdown
Contributor Author

With regard to the Copilot comment above about upstream template changes and appending the extrahead block with >>: I've been setting up some integration prechecks that, among other things, address this concern. I've opened up a separate PR with these checks: #1480.

@roosterfish

Copy link
Copy Markdown
Contributor

With regard to the Copilot comment above about upstream template changes and appending the extrahead block with >>: I've been setting up some integration prechecks that, among other things, address this concern. I've opened up a separate PR with these checks: #1480.

Should we merge #1480 earlier then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Documentation needs updating

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants