fix(tutorials): drop title attr from step nav links so GitHub Pages resolves them - #320
Merged
Merged
Conversation
…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.
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.
Problem
On the deployed GitHub Pages site, the Next / Previous links on the Data Binding tutorial step pages point at
README.mdinstead 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:
build/NN/README.htmltools/builder/prepare-gh-pages.js(README.md→index.html)steps/NN/index.html(linked from the tutorial landing page)jekyll-relative-linkspluginjekyll-relative-linksauto-converts relative../NN/README.mdlinks to their HTML permalinks — but it silently skips any link that carries a title attribute:databinding,walkthroughandquickstartwrote their nav links with a title;navigationandodatav4wrote 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.mdNext/Previous links across the three affected tutorials (55 files). This satisfies every rendering context:.mdlinks, unchanged.steps/NN/index.html— Jekyll now rewrites../06/README.md→ the correct step page.build/NN/README.html— unaffected; the builder's own regex still rewritesREADME.md→index.htmland preserves the hover tooltip there.Only sibling-step nav links were touched — 122 external / demo-kit / LICENSE titled links are left intact.
Scope
The only user-visible loss is the hover tooltip on the
steps/NN/view; it remains on thebuild/…/README.htmlrender.Verification
databinding/walkthrough/quickstartsteps/NN/index.html→../06/README.md;navigation/odatav4→ clean permalinks.../06/index.htmlforbuild/NN/README.html; sibling target READMEs exist for in-repo nav.