Fix internal links#147
Closed
yqtian-se wants to merge 1 commit into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates legacy site content to eliminate broken internal URLs and introduces a Node-based post-build checker intended to validate internal links in the generated Hugo public/ output.
Changes:
- Add
scripts/check-all-internal-links.mjsto crawl built HTML and verify internal URL targets exist underPUBLIC_DIR. - Introduce new Hugo partials for navigation (
layouts/partials/nav.html) and URL normalization (layouts/partials/menu_url.html). - Fix/normalize numerous internal links across Markdown and legacy HTML content (e.g., removing Cloudflare
/cdn-cgi/email-protection links, switching tomailto:, updating pretty URLs).
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/check-all-internal-links.mjs | Adds a generated-site internal link checker for built HTML output. |
| layouts/partials/nav.html | Adds a navbar partial rendering the Hugo menu.main structure. |
| layouts/partials/menu_url.html | Adds a helper partial to render menu URLs as absolute vs. site-relative. |
| content/SEN/surfing.md | Fixes missing URL schemes on external links. |
| content/policies/sponsorship.md | Updates internal links to pretty URLs and corrected destinations. |
| content/policies/cooperation.md | Updates Program Committee policy link to pretty URL. |
| content/opentoc/MODELS2018-TOC.html | Removes Cloudflare email-protection links/scripts that break internal link checks. |
| content/opentoc/ICSE2018Companion-TOC.html | Removes Cloudflare email-protection links/scripts that break internal link checks. |
| content/opentoc/ESEM2018-TOC.html | Removes Cloudflare email-protection links/scripts that break internal link checks. |
| content/logos/logos.md | Updates logo asset links/filenames and image paths. |
| content/dissertations.md | Converts email “links” to mailto: and removes NULL placeholders. |
| content/awards/distinguishedPaper.md | Removes a Cloudflare email-protection internal link reference. |
| content/annualrpt/2019annualreport.md | Fixes an image path to a valid static location. |
| content/about.md | Updates internal links to pretty URLs for dissertations and annual reports. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+109
to
+111
| const stripped = stripSiteBasePath(urlPath).split("#")[0].split("?")[0]; | ||
| const decoded = safeDecode(stripped).replace(/^\/+/, ""); | ||
| const candidate = path.join(publicRoot, decoded); |
Comment on lines
+28
to
+45
| {{ $topLevel := replace .URL "/" "" }} | ||
| {{ $active := "" }} | ||
|
|
||
| {{ if eq $current.RelPermalink .URL }} | ||
| {{ $active = "active" }} | ||
| {{ end }} | ||
|
|
||
| {{ if eq $current.Type $topLevel }} | ||
| {{ $active = "active" }} | ||
| {{ end }} | ||
|
|
||
| {{ if and (or (eq $current.RelPermalink .URL) (eq "term" $current.Kind)) (in (slice "page" "term") $current.Kind) }} | ||
| {{ range (split .URL "/") }} | ||
| {{ if eq "blog" . }} | ||
| {{ $active = "active" }} | ||
| {{ end }} | ||
| {{ end }} | ||
| {{ end }} |
|
|
||
| - [Portable Network Graphics PNG](/logos/sigsoft-no-tagline.png) | ||
| - [Adobe Illustrator AI](/logos/sigsoft-no-tagline.ai) | ||
| - [Adobe Illustrator AI](/logos/sigsoft-no-tagline.ai.ps) |
yqtian-se
force-pushed
the
codex/internal-link-checking
branch
from
July 18, 2026 03:01
588b705 to
3b382a0
Compare
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.
Fixes broken internal links across legacy content and adds a reusable generated-site link checker for validating all internal URLs after Hugo builds.