Skip to content

fix(tutorials): drop title attr from step nav links so GitHub Pages resolves them - #320

Merged
petermuessig merged 1 commit into
mainfrom
fix/gh-pages-nav-link-titles
Aug 6, 2026
Merged

fix(tutorials): drop title attr from step nav links so GitHub Pages resolves them#320
petermuessig merged 1 commit into
mainfrom
fix/gh-pages-nav-link-titles

Conversation

@petermuessig

Copy link
Copy Markdown
Contributor

Problem

On the deployed GitHub Pages site, the Next / Previous links on the Data Binding tutorial step pages point at README.md instead of the rendered HTML page, so they 404. Reported for Data Binding; the same defect also affects Walkthrough and Quickstart.

Root cause

There are two rendered doc pages per step on gh-pages, rewritten by two different mechanisms:

Page Rewritten by Handles titled links?
build/NN/README.html builder regex in tools/builder/prepare-gh-pages.js (README.mdindex.html) ✅ yes
steps/NN/index.html (linked from the tutorial landing page) Jekyll's built-in jekyll-relative-links plugin no

jekyll-relative-links auto-converts relative ../NN/README.md links to their HTML permalinks — but it silently skips any link that carries a title attribute:

<!-- rewritten by Jekyll → works -->
**Next:** [Step 6: …](../06/README.md)

<!-- skipped by Jekyll → stays ../06/README.md → 404 on Pages -->
**Next:** [Step 6: …](../06/README.md "Business applications often require…")

databinding, walkthrough and quickstart wrote their nav links with a title; navigation and odatav4 wrote them without one — which is exactly why only the former three break. Verified against the live site.

Fix

Remove the title attribute from all 104 sibling-step ../NN/README.md Next/Previous links across the three affected tutorials (55 files). This satisfies every rendering context:

  • GitHub in-repo navigation — still plain relative .md links, unchanged.
  • Pages steps/NN/index.html — Jekyll now rewrites ../06/README.md → the correct step page.
  • Pages build/NN/README.html — unaffected; the builder's own regex still rewrites README.mdindex.html and preserves the hover tooltip there.

Only sibling-step nav links were touched — 122 external / demo-kit / LICENSE titled links are left intact.

Scope

Tutorial Files changed
databinding 15
walkthrough 38
quickstart 2

The only user-visible loss is the hover tooltip on the steps/NN/ view; it remains on the build/…/README.html render.

Verification

  • Reproduced on live: databinding/walkthrough/quickstart steps/NN/index.html../06/README.md; navigation/odatav4 → clean permalinks.
  • After fix: builder regex still yields ../06/index.html for build/NN/README.html; sibling target READMEs exist for in-repo nav.
  • 0 titled sibling-step nav links remain repo-wide.

…esolves them

The per-step pages browsable on GitHub Pages (steps/NN/index.html) are
rendered by Jekyll's built-in jekyll-relative-links plugin, which rewrites
relative `../NN/README.md` links to their HTML permalinks. That plugin
silently skips any link carrying a title attribute, so titled nav links stay
as `README.md` and 404 on Pages.

databinding, walkthrough and quickstart wrote their Next/Previous links with a
title attribute; navigation and odatav4 did not (and worked). Strip the title
from all 104 sibling-step `../NN/README.md` nav links across the three
affected tutorials so Jekyll rewrites them like the working ones.

- GitHub in-repo navigation: unchanged (plain relative .md links).
- Pages steps/NN/: Jekyll now rewrites ../06/README.md -> the correct page.
- Pages build/NN/README.html: unaffected; the builder's own regex rewrites
  README.md -> index.html and keeps the hover tooltip there.
@petermuessig
petermuessig requested a review from margopolo August 4, 2026 15:48

@margopolo margopolo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@petermuessig
petermuessig merged commit 412338f into main Aug 6, 2026
3 checks passed
@petermuessig
petermuessig deleted the fix/gh-pages-nav-link-titles branch August 6, 2026 10:05
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.

2 participants