Skip to content

docs: noindex development manuals so they defer to grass-stable - #7772

Merged
echoix merged 3 commits into
OSGeo:mainfrom
cwhite911:seo-noindex-dev-docs
Jul 25, 2026
Merged

echoix merged 3 commits into
OSGeo:mainfrom
cwhite911:seo-noindex-dev-docs

Conversation

@cwhite911

Copy link
Copy Markdown
Contributor

Followup to (PR #5935) to emit 'noindex, follow' on dev builds for both MkDocs and Sphinx. The stable and release builds leave the flag off and stay indexable.

Dev builds (VERSION micro ends in 'dev') publish under grass-devel/grass86 with
pages near-identical to grass-stable. They all canonicalize to grass-stable
(see OSGeo#5935), but dev-only pages have no stable equivalent to canonicalize to, so
canonical alone can leave them indexed. Emit 'noindex, follow' on dev builds for
both generators:

- MkDocs: new overrides/main.html gated on extra.noindex, fed by GRASS_DOCS_NOINDEX
  which documentation.yml sets to true when MICRO ends in 'dev'.
- Sphinx: conf.py sets grass_noindex from the version and passes it via html_context
  to layout.html.template.

Stable and release builds leave the flag off and stay indexable.
@cwhite911 cwhite911 self-assigned this Jul 24, 2026
@github-actions github-actions Bot added CI Continuous integration Python Related code is in Python HTML Related code is in HTML libraries docs labels Jul 24, 2026
mkdocs !ENV coerces the value to a boolean, so the == "true" test never matched.
@cwhite911
cwhite911 requested a review from echoix July 25, 2026 01:14
The build copies mkdocs files individually, so the new override was missing
from MKDOCS_DIR and dev pages got no noindex.

@echoix echoix left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Letting you do your job, looks implemented as described in the PR description

@echoix
echoix merged commit 0163d24 into OSGeo:main Jul 25, 2026
27 checks passed
@github-actions github-actions Bot added this to the 8.6.0 milestone Jul 25, 2026
@cwhite911

cwhite911 commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor Author

@echoix @neteler I think this need PR needs to be backported to trigger the rebuild of the releasebranch_8_5 artifact to correct the grass-stable/grass85 sitemaps.

@neteler neteler added the backport to 8.5 PR needs to be backported to release branch 8.5 label Jul 26, 2026
@cwhite911

cwhite911 commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor Author

The main issue is that we need to also remove the extra sitemap from libpython after we merge it with the rest of the docs.

@echoix

echoix commented Jul 26, 2026

Copy link
Copy Markdown
Member

@echoix @neteler I think this need PR needs to be backported to trigger the rebuild of the releasebranch_8_5 artifact to correct the grass-stable/grass85 sitemaps.

You can alternatively create a PR for that branch to merge it.

@neteler

neteler commented Jul 26, 2026

Copy link
Copy Markdown
Member

The main issue is that we need to also remove the extra sitemap from libpython after we merge it with the rest of the docs.

Shall #7740 be backported as well?

@cwhite911

cwhite911 commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor Author

The main issue is that we need to also remove the extra sitemap from libpython after we merge it with the rest of the docs.

I've added.

@neteler neteler removed the backport to 8.5 PR needs to be backported to release branch 8.5 label Jul 26, 2026
@cwhite911

cwhite911 commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor Author

This PR, #7772, should not be backported or merge with releasebranch_8_5 until we apply the fix form #7782.

The way it was originally written breaks with the releasebranch_* branch and would set the grass-stable docs to noindex. This happens because the logic uses the MIRCO version to set noindex in the html. For releasebranch _8_5 MICRO resolves to MICRO=1dev (include/VERSION) triggering a false positive.

Once #7781 #7782 are merged we need to backport or merge to releasebranch_8_5.

@echoix @neteler I think this need PR needs to be backported to trigger the rebuild of the releasebranch_8_5 artifact to correct the grass-stable/grass85 sitemaps.

You can alternatively create a PR for that branch to merge it.

What is the preference here?

@echoix

echoix commented Jul 26, 2026

Copy link
Copy Markdown
Member

Since backports are usually only cherry-picks of squash-merge commits on main, done by principally one person, if there’s something harder or special that you happen to know about, either just do the backport and remove the label (the labels are « to backport » rather than « backported »), or create a PR to do the good thing.

When cherry-picks fails, it’s not fun to backport

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

Labels

CI Continuous integration docs HTML Related code is in HTML libraries Python Related code is in Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants