Skip to content

Fix: Disable edit links for unreleased versions#1066

Merged
yurishkuro merged 1 commit intomainfrom
fix-issue-1065-edit-links
Apr 7, 2026
Merged

Fix: Disable edit links for unreleased versions#1066
yurishkuro merged 1 commit intomainfrom
fix-issue-1065-edit-links

Conversation

@jkowall
Copy link
Copy Markdown
Collaborator

@jkowall jkowall commented Feb 8, 2026

This PR fixes #1065 by disabling verification the 'Edit this page' links.

The fix is now just a one-line regex change in .htmltest.yml:

  • Scoped to jaegertracing/documentation instead of the overly broad .*?/.*?/
  • Added tree to match "View this page" links (the actual source of CI failures), alongside edit and new
-  - ^https?://github\.com/.*?/.*?/(new|edit)/ # view-page, edit-source etc
+  - ^https?://github\.com/jaegertracing/documentation/(tree|edit|new)/

Copilot AI review requested due to automatic review settings February 8, 2026 05:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates Docsy meta link rendering and link-check configuration to avoid CI failures caused by “Edit/View this page” GitHub links that point at content not present on the main branch yet (intended for unreleased docs content).

Changes:

  • Adds a Docsy partial override to suppress GitHub view/edit/create-child links for _dev content.
  • Removes the htmltest ignore rule that skipped Docsy-generated GitHub new|edit URLs.
  • Expands AGENTS.md with local verification/testing guidance and doc versioning notes.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
themes/docsy-overrides/layouts/_partials/page-meta-links.html Conditionally hides GitHub meta links for _dev pages.
AGENTS.md Adds contributor workflow tips (build/test/link checks/spellcheck/versioning).
.htmltest.yml Changes link-check ignore patterns to start checking Docsy GitHub edit links.

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

Comment thread themes/docsy-overrides/layouts/_partials/page-meta-links.html Outdated
Comment thread .htmltest.yml Outdated
@yurishkuro
Copy link
Copy Markdown
Member

disabling the 'Edit this page' link for unreleased versions (files in _dev).

the linter was failing for the latest release links which are valid in the PR branch but not valid against main. The _dev links have nothing to do with those errors, they are always present.

@jkowall
Copy link
Copy Markdown
Collaborator Author

jkowall commented Feb 8, 2026

disabling the 'Edit this page' link for unreleased versions (files in _dev).

the linter was failing for the latest release links which are valid in the PR branch but not valid against main. The _dev links have nothing to do with those errors, they are always present.

Thanks, I reverted the _dev exclusion logic as you pointed out.
I added dynamic branch resolution: when CI=true, edit links now point to GITHUB_SHA (Actions) or HEAD (Netlify) instead of main.
Updated hugo.yaml to whitelist these environment variables

Comment thread themes/docsy-overrides/layouts/_partials/page-meta-links.html Outdated
@jkowall
Copy link
Copy Markdown
Collaborator Author

jkowall commented Apr 6, 2026

Simplified per @yurishkuro's feedback — dropped the Docsy template override entirely.

The fix is now just a one-line regex change in .htmltest.yml:

  • Scoped to jaegertracing/documentation instead of the overly broad .*?/.*?/
  • Added tree to match "View this page" links (the actual source of CI failures), alongside edit and new
-  - ^https?://github\.com/.*?/.*?/(new|edit)/ # view-page, edit-source etc
+  - ^https?://github\.com/jaegertracing/documentation/(tree|edit|new)/

…1065)

The previous regex missed /tree/ URLs (Docsy "View this page" links),
causing htmltest to check them and get rate-limited (429) by GitHub.

Signed-off-by: Jonah Kowall <jkowall@kowall.net>
Copilot AI review requested due to automatic review settings April 6, 2026 12:50
@jkowall jkowall force-pushed the fix-issue-1065-edit-links branch from 12ef2fa to cd87a23 Compare April 6, 2026 12:50
Copy link
Copy Markdown

Copilot AI left a comment

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 1 out of 1 changed files in this pull request and generated 1 comment.


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

Comment thread .htmltest.yml
@yurishkuro yurishkuro merged commit 37cd701 into main Apr 7, 2026
12 checks passed
@yurishkuro yurishkuro deleted the fix-issue-1065-edit-links branch April 7, 2026 14:38
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.

CI link checker fails on release PRs that add new documentation for unreleased versions

3 participants