feat: SEO improvements - #1538
Merged
Merged
Conversation
jorgepiloto
requested review from
AlejandroFernandezLuces,
MaxJPRey,
RobPasMue and
moe-ad
September 3, 2026 07:55
jorgepiloto
force-pushed
the
feat/seo-improvements
branch
from
September 3, 2026 08:12
a8b91b4 to
76b1a13
Compare
jorgepiloto
marked this pull request as draft
September 3, 2026 08:22
jorgepiloto
marked this pull request as ready for review
September 3, 2026 08:39
RobPasMue
approved these changes
Sep 3, 2026
RobPasMue
left a comment
Member
There was a problem hiding this comment.
Overall they look good! I'm assuming you've tested them on a repo directly. Do you have a log of the executions?
Revathyvenugopal162
approved these changes
Sep 3, 2026
When ``use-latest-index-in-landing-page`` is true, the deploy actions
copy ``version/{stable|dev|prerelease}/index.html`` to ``index.html``
at the site root and rewrite its internal links. In prerelease-only or
first-time deploys the copy source has already been stamped with a
``noindex, follow`` robots meta by ``_doc-gen-noindex``, and the
canonical originally set for its versioned URL was either replaced by a
different value or removed altogether. As a result the root landing
page inherited the source's ``noindex`` and lost its canonical, hiding
the site from search engines that only see the root URL.
Add a post-copy step to both ``doc-deploy-dev`` and
``doc-deploy-stable`` that strips any inherited robots meta from
``index.html`` and enforces ``<link rel="canonical"
href="https://${CNAME}/">``. The step is idempotent, a no-op in the
normal stable-exists case, and is gated by the same
``use-latest-index-in-landing-page`` guard as the copy step.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When the only artifact being deployed is a prerelease with no prior "version/stable" or "version/dev" tree in gh-pages, "_doc-gen-canonical" used to exit 1 because it could not find a landing baseline, and "_doc-gen-versions-page" would fail because its first "cp" step also assumed one of those directories existed. Both actions now warn and skip gracefully so the pipeline can complete on that scenario. The root landing page canonical is enforced separately by the "Ensure the root landing page is indexable and self-canonical" step in "doc-deploy-dev" and "doc-deploy-stable", so no coverage is lost. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pull-request preview documentation previously relied on the top-level robots.txt Disallow directive for /pull/ to keep search engines away from every preview under pull/<pr>/. That disallow works for well-behaved crawlers, but it does not stop crawlers that discover preview URLs from external backlinks (for example the PR comment that advertises the preview URL) from indexing them, and it does not remove pages that were already indexed before this rule existed. Add _doc-gen-noindex invocations that stamp "noindex, follow" meta tags directly into every pull-preview HTML page: - _pr-doc-deployment stamps every new preview at deploy time. - doc-deploy-dev and doc-deploy-stable retroactively stamp all remaining pull/*/ dirs so previews deployed before this feature also drop out of search indexes. Both are gated on the presence of at least one pull HTML so the step is a no-op when there is nothing to stamp. Both are safe to re-run because the noindex step strips and reinjects the meta tag. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the "_doc-gen-noindex" action description to reflect that the action is now invoked with "version-directory: pull" as well, and add a v11 migration guide entry that lists every user-visible SEO change: noindex on non-stable and pull-preview pages, wildcard "robots.txt", sitemap noindex-aware skipping and extended default exclude list, "include-sitemap" input, and root-landing self-canonical enforcement. Also drop a stray blank-line-only change under the v6 section that was introduced earlier in the branch. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jorgepiloto
marked this pull request as draft
September 4, 2026 17:53
Member
Author
|
Converting this to a draft. @SMoraisAnsys would like to review this pull before merging it. |
SMoraisAnsys
approved these changes
Sep 7, 2026
SMoraisAnsys
left a comment
Contributor
There was a problem hiding this comment.
LGTM, just requesting a minor change related to private actions and the use of required inputs only. Otherwise, LGTM. Thanks for the work guys !
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The pull-request preview cleanup loop calls gh pr comment on every closed PR directory. Under set -eo pipefail, a locked PR, a missing pull-requests: write scope, or a transient API failure would abort the deploy and leave the closed directory in place; the next run then retries the same closed PR and either crashes again or spams the same notice. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The canonical rewrite used sed 's|<link rel="canonical".*>|...|g' which is greedy and, on minified or single-line HTML, matches through to the last '>' on the line, silently deleting every intervening tag. Constrain to [^>]* so only the canonical tag itself is replaced. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
actions/download-artifact does not preserve source mtimes, so every file's mtime collapses to the artifact extraction time. Per Google's docs, an inaccurate <lastmod> causes them to distrust and eventually ignore the signal for the whole site. Emit <lastmod> only for the site-root entry, which is legitimately 'now' for the deploy. Also restrict the noindex scan to the <head> window so 'noindex' inside a <script> body, an HTML comment, or a substring like 'noindexing-guide' no longer causes false-positive page drops. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
A caller passing 'version/' would build the find filter as '! -path "version//stable/*"' which does not match 'version/stable/foo.html', causing every stable page to be silently noindex-stamped. Strip any trailing slash before building the filter and reject an empty input as a no-op. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Drop the mention of 'optional include-sitemap default true' and the suggestion to override 'exclude' on the private _doc-gen-sitemap action, which are no longer accurate after the required-input policy landed. Document that per-URL <lastmod> is intentionally omitted. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The doc-style CI reported a Vale.Spelling error on 'backlinks' at doc/source/migrations/index.rst:89. Add 'backlinks' to the ANSYS vocabulary accept-list (regex form '[Bb]acklinks?' to cover singular/plural and casing) since it is a well-established SEO term. Also drop 'will' from line 93 to silence the Google.Will style warning on the same file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jorgepiloto
marked this pull request as ready for review
September 7, 2026 12:20
moe-ad
pushed a commit
that referenced
this pull request
Sep 7, 2026
Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull-request fixes our SEO strategy by: