Skip to content

Commit fe19def

Browse files
034: rewrite relative .md links to .html via jekyll-relative-links
Cross-doc links like [Coverage](coverage.md) were 404ing on the deployed site because Jekyll left the .md extension as-is while pages are served as .html. Add the jekyll-relative-links plugin (designed exactly for this) to auto-rewrite all relative *.md links to their *.html counterparts during build. No source-file edits needed — the same links continue to work on GitHub and on the docs site.
1 parent 2980eec commit fe19def

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docs/Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ source "https://rubygems.org"
33
gem "jekyll", "~> 4.3"
44
gem "just-the-docs", "~> 0.10"
55
gem "jekyll-seo-tag", "~> 2.8"
6+
gem "jekyll-relative-links", "~> 0.6"
67

78
# Windows / JRuby support (no-op on Linux runners)
89
platforms :mingw, :x64_mingw, :mswin, :jruby do

docs/_config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ back_to_top_text: "Back to top"
5353
# Plugins
5454
plugins:
5555
- jekyll-seo-tag
56+
- jekyll-relative-links
57+
58+
# jekyll-relative-links: rewrite relative *.md links to their built
59+
# *.html counterparts so cross-doc references work on the deployed site.
60+
relative_links:
61+
enabled: true
62+
collections: true
5663

5764
# Default layout for every page (Just the Docs sidebar + header)
5865
defaults:

0 commit comments

Comments
 (0)