Commit f569be1
Restore "Edit this Page" link for editable docs pages (#20900)
* Restore "Edit this Page" link for editable docs pages
Bring back the right-rail "Edit this Page" link that was dropped in #19855,
but only surface it on pages a reader can actually edit in this repo.
Rather than the stale path-prefix checks the old version used (the CLI and
reference-doc paths have since moved), suppression is driven by signals that
stay correct as content moves:
- generated pages are detected by the "Auto generated by ..." marker they
carry (the same signal scripts/lint/lint-markdown.js already trusts),
- registry package docs are excluded since they're built from pulumi/registry,
- no_edit_this_page: true remains a manual per-page opt-out.
The link uses the docs semantic color tokens so it reads correctly in both
light and dark mode.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Anchor registry edit-link guard to the path prefix
The previous strings.Contains "registry/" check matched any permalink
containing that substring — including /docs/idp/concepts/private-registry/,
which wrongly suppressed the edit link. Use hasPrefix on .File.Path so only
the top-level registry/ section (built from pulumi/registry) is excluded.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Drop the registry edit-link guard
Everything under /registry is built and deployed from pulumi/registry, so no
page in this repo renders through this partial with a registry/ path. The
guard was dead code; remove it. Suppression now rests on the auto-generated
marker and the no_edit_this_page opt-out.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 510dad1 commit f569be1
1 file changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
60 | 76 | | |
61 | 77 | | |
62 | 78 | | |
| |||
0 commit comments