Skip to content

Commit 98cea77

Browse files
authored
Fix relative links in Jekyll (#138)
While GitHub has no issues with relative links between files, Jekyll does not work with them out of the box. For example, `[title](title.md)` will create a link to `https://domain.com/title.md`, not `https://domain.com/title.html`. This will result in a 404 on the GitHub pages URL. The `jekyll-relative-links` plugin changes the links to point to the html URLs correctly, leading to a consistent experience between the Markdown and GitHub pages. Fixes #137
1 parent 83825d3 commit 98cea77

File tree

3 files changed

+28
-17
lines changed

3 files changed

+28
-17
lines changed

docs/Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ gem "jekyll", "~> 4.3.2"
55
gem "just-the-docs", "0.6.2"
66

77
gem 'jekyll-titles-from-headings'
8+
9+
gem 'jekyll-relative-links'

docs/Gemfile.lock

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
addressable (2.8.5)
5-
public_suffix (>= 2.0.2, < 6.0)
4+
addressable (2.8.7)
5+
public_suffix (>= 2.0.2, < 7.0)
6+
bigdecimal (3.1.8)
67
colorator (1.1.0)
7-
concurrent-ruby (1.2.2)
8+
concurrent-ruby (1.3.3)
89
em-websocket (0.5.3)
910
eventmachine (>= 0.12.9)
1011
http_parser.rb (~> 0)
1112
eventmachine (1.2.7)
12-
ffi (1.15.5)
13+
ffi (1.17.0-x86_64-linux-gnu)
1314
forwardable-extended (2.6.0)
14-
google-protobuf (3.24.3-x86_64-linux)
15+
google-protobuf (4.27.2-x86_64-linux)
16+
bigdecimal
17+
rake (>= 13)
1518
http_parser.rb (0.8.0)
16-
i18n (1.14.1)
19+
i18n (1.14.5)
1720
concurrent-ruby (~> 1.0)
18-
jekyll (4.3.2)
21+
jekyll (4.3.3)
1922
addressable (~> 2.4)
2023
colorator (~> 1.0)
2124
em-websocket (~> 0.5)
@@ -33,6 +36,8 @@ GEM
3336
webrick (~> 1.7)
3437
jekyll-include-cache (0.2.1)
3538
jekyll (>= 3.7, < 5.0)
39+
jekyll-relative-links (0.7.0)
40+
jekyll (>= 3.3, < 5.0)
3641
jekyll-sass-converter (3.0.0)
3742
sass-embedded (~> 1.54)
3843
jekyll-seo-tag (2.8.0)
@@ -51,33 +56,36 @@ GEM
5156
kramdown-parser-gfm (1.1.0)
5257
kramdown (~> 2.0)
5358
liquid (4.0.4)
54-
listen (3.8.0)
59+
listen (3.9.0)
5560
rb-fsevent (~> 0.10, >= 0.10.3)
5661
rb-inotify (~> 0.9, >= 0.9.10)
5762
mercenary (0.4.0)
5863
pathutil (0.16.2)
5964
forwardable-extended (~> 2.6)
60-
public_suffix (5.0.3)
61-
rake (13.0.6)
65+
public_suffix (6.0.0)
66+
rake (13.2.1)
6267
rb-fsevent (0.11.2)
63-
rb-inotify (0.10.1)
68+
rb-inotify (0.11.1)
6469
ffi (~> 1.0)
65-
rexml (3.2.6)
66-
rouge (4.1.3)
70+
rexml (3.3.1)
71+
strscan
72+
rouge (4.3.0)
6773
safe_yaml (1.0.5)
68-
sass-embedded (1.63.6)
69-
google-protobuf (~> 3.23)
70-
rake (>= 13.0.0)
74+
sass-embedded (1.77.8)
75+
google-protobuf (~> 4.26)
76+
rake (>= 13)
77+
strscan (3.1.0)
7178
terminal-table (3.0.2)
7279
unicode-display_width (>= 1.1.1, < 3)
73-
unicode-display_width (2.4.2)
80+
unicode-display_width (2.5.0)
7481
webrick (1.8.1)
7582

7683
PLATFORMS
7784
x86_64-linux
7885

7986
DEPENDENCIES
8087
jekyll (~> 4.3.2)
88+
jekyll-relative-links
8189
jekyll-titles-from-headings
8290
just-the-docs (= 0.6.2)
8391

docs/_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ url: "https://adr.github.io"
4343

4444
plugins:
4545
- jekyll-titles-from-headings
46+
- jekyll-relative-links

0 commit comments

Comments
 (0)