Skip to content

Point both overview nav slots at the canonical concept pages - #58

Merged
flybayer merged 4 commits into
mainfrom
devin/1787060838-docs-canonical-only-sitemap
Aug 18, 2026
Merged

Point both overview nav slots at the canonical concept pages#58
flybayer merged 4 commits into
mainfrom
devin/1787060838-docs-canonical-only-sitemap

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

/docs/modules/overview and /docs/pipelines/overview were duplicate alias pages: each rendered the same shared snippet as its canonical concept page (/docs/concepts/modules, /docs/concepts/pipelines) and each appeared in the generated sitemap, so the sitemap advertised two indexable URLs per topic.

The aliases are gone. Their two sidebar slots now point at the canonical pages instead, so the same page path appears in two navigation locations:

 { "group": "Modules", "pages": [
-  "modules/overview",
+  "concepts/modules",
    "modules/stack", ...
 { "group": "Pipelines", "pages": [
-  "pipelines/overview",
+  "concepts/pipelines",
    "pipelines/examples", ...

Legacy URLs keep working via docs.json redirects with permanent: true, and internal links (plus the assistant skill citation) were repointed at the canonical paths.

No page ends up with noindex or a cross-page canonical: the sitemap now contains one indexable URL per topic because only one page exists per topic.

scripts/check-docs-seo-invariants.mjs (replacing check-canonical-noindex.mjs, wired into CI and pnpm test) fails the build if a future change reintroduces the problem shape:

  • a redirect destination that doesn't resolve to an MDX page, isn't in navigation, or is noindex/hidden
  • a live MDX page sitting at a redirect source (it would shadow the redirect)
  • any page with noindex: true, or a canonical pointing at a different page
  • wildcard/parameterized redirects are skipped, since they can't be resolved statically

Platform behavior worth knowing

  • Mintlify redirects are permanent 308, not 301 — permanent: false gives 307. A literal 301 isn't configurable. Google treats 308 as equivalent to 301 for consolidating ranking signals.
  • Sitemap exclusion is coupled to indexing on Mintlify: per its hidden pages table, noindex: true keeps a page in the nav but drops it from the sitemap, and hidden: true drops it from both. There is no way to keep an alias in the nav, indexable, and out of the sitemap — which is why the aliases were removed outright rather than kept with rel=canonical only.
  • A group's pages entries are page paths with no per-entry label override, so the two slots now render the canonical page's sidebarTitle ("Modules" / "Pipelines") where they previously read "Overview". Placement and discoverability are unchanged.

Verification

mint validate and mint broken-links both pass; mint dev serves the redirects (307 locally — the dev server doesn't apply permanent; hosted Mintlify serves 308). Invariant check, node --test scripts/*.test.mjs (10 passing), and the OG image check all pass.

Both nav locations render and resolve to the single canonical URL:

Modules in the Concepts group and the Modules group

Pipelines in the Concepts group and the Pipelines group

mint dev does not serve sitemap.xml (404 locally), so the sitemap and the real redirect status come from this PR's Mintlify preview deployment:

$ curl -sI <preview>/modules/overview | head -3
HTTP/2 308
location: /concepts/modules
$ curl -sI <preview>/pipelines/overview | head -3
HTTP/2 308
location: /concepts/pipelines

$ curl -s <preview>/sitemap.xml | grep -E 'modules|pipelines' | grep -v api-reference
<loc>.../concepts/modules</loc>
<loc>.../concepts/pipelines</loc>
<loc>.../modules/build</loc> ... (no /modules/overview, no /pipelines/overview)

Link to Devin session: https://app.devin.ai/sessions/77b84201f8324d089aae372d6ed87da1

devin-ai-integration Bot and others added 2 commits August 18, 2026 13:48
Co-Authored-By: bot_apk <apk@cognition.ai>
Co-Authored-By: bot_apk <apk@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@mintlify

mintlify Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Ravion 🟢 Ready View Preview Aug 18, 2026, 1:56 PM

Comment thread scripts/check-canonical-noindex.mjs Outdated
}
if (!value || typeof value !== "object") return;
for (const [key, child] of Object.entries(value)) {
visit(child, key === "pages");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Navigation roots are omitted

The collector only recognizes strings under pages, while this repository also uses root for navigated page references. An alias targeting a root page such as deploy/aws is therefore reported as absent from navigation, causing the new CI check to reject valid metadata.

Suggested change
visit(child, key === "pages");
visit(child, key === "pages" || key === "root");
Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/check-canonical-noindex.mjs
Line: 67

Comment:
**Navigation roots are omitted**

The collector only recognizes strings under `pages`, while this repository also uses `root` for navigated page references. An alias targeting a root page such as `deploy/aws` is therefore reported as absent from navigation, causing the new CI check to reject valid metadata.

```suggestion
      visit(child, key === "pages" || key === "root");
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

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.

Good catch — docs.json does use root for navigated group landing pages (deploy/aws, module-definitions/standard-library, module-definitions/definition-schema), so an alias canonicalizing to one of those would have been rejected. Fixed in 9f380a6, with a test covering a canonical target that only appears as a group root.

Co-Authored-By: bot_apk <apk@cognition.ai>
Replace the /modules/overview and /pipelines/overview alias pages with the
canonical concept pages in both navigation locations, redirect the legacy
URLs permanently, and enforce the SEO invariants in a check script.
@devin-ai-integration devin-ai-integration Bot changed the title Keep noncanonical docs aliases out of the sitemap Point both overview nav slots at the canonical concept pages Aug 18, 2026
@flybayer
flybayer merged commit 8a40f16 into main Aug 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant