Skip to content

Commit a73957b

Browse files
committed
Use absolute_url to ensure baseurl and url are included in internal links
1 parent 0be7b07 commit a73957b

5 files changed

Lines changed: 158 additions & 92 deletions

File tree

Gemfile.lock

Lines changed: 88 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,64 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (6.1.7.5)
5-
concurrent-ruby (~> 1.0, >= 1.0.2)
4+
activesupport (8.0.2)
5+
base64
6+
benchmark (>= 0.3)
7+
bigdecimal
8+
concurrent-ruby (~> 1.0, >= 1.3.1)
9+
connection_pool (>= 2.2.5)
10+
drb
611
i18n (>= 1.6, < 2)
12+
logger (>= 1.4.2)
713
minitest (>= 5.1)
8-
tzinfo (~> 2.0)
9-
zeitwerk (~> 2.3)
10-
addressable (2.8.1)
11-
public_suffix (>= 2.0.2, < 6.0)
14+
securerandom (>= 0.3)
15+
tzinfo (~> 2.0, >= 2.0.5)
16+
uri (>= 0.13.1)
17+
addressable (2.8.7)
18+
public_suffix (>= 2.0.2, < 7.0)
19+
base64 (0.2.0)
20+
benchmark (0.4.1)
21+
bigdecimal (3.2.2)
1222
coffee-script (2.4.1)
1323
coffee-script-source
1424
execjs
15-
coffee-script-source (1.11.1)
25+
coffee-script-source (1.12.2)
1626
colorator (1.1.0)
17-
commonmarker (0.23.10)
18-
concurrent-ruby (1.3.4)
19-
dnsruby (1.61.9)
20-
simpleidn (~> 0.1)
27+
commonmarker (0.23.11)
28+
concurrent-ruby (1.3.5)
29+
connection_pool (2.5.3)
30+
csv (3.3.5)
31+
dnsruby (1.72.4)
32+
base64 (~> 0.2.0)
33+
logger (~> 1.6.5)
34+
simpleidn (~> 0.2.1)
35+
drb (2.2.3)
2136
em-websocket (0.5.3)
2237
eventmachine (>= 0.12.9)
2338
http_parser.rb (~> 0)
24-
ethon (0.15.0)
39+
ethon (0.16.0)
2540
ffi (>= 1.15.0)
2641
eventmachine (1.2.7)
27-
execjs (2.8.1)
28-
faraday (2.5.2)
29-
faraday-net_http (>= 2.0, < 3.1)
30-
ruby2_keywords (>= 0.0.4)
31-
faraday-net_http (3.0.0)
32-
ffi (1.15.5)
42+
execjs (2.10.0)
43+
faraday (2.13.1)
44+
faraday-net_http (>= 2.0, < 3.5)
45+
json
46+
logger
47+
faraday-net_http (3.4.1)
48+
net-http (>= 0.5.0)
49+
ffi (1.17.2-x86_64-linux-gnu)
3350
forwardable-extended (2.6.0)
34-
gemoji (3.0.1)
35-
github-pages (228)
36-
github-pages-health-check (= 1.17.9)
37-
jekyll (= 3.9.3)
38-
jekyll-avatar (= 0.7.0)
39-
jekyll-coffeescript (= 1.1.1)
40-
jekyll-commonmark-ghpages (= 0.4.0)
41-
jekyll-default-layout (= 0.1.4)
42-
jekyll-feed (= 0.15.1)
51+
gemoji (4.1.0)
52+
github-pages (232)
53+
github-pages-health-check (= 1.18.2)
54+
jekyll (= 3.10.0)
55+
jekyll-avatar (= 0.8.0)
56+
jekyll-coffeescript (= 1.2.2)
57+
jekyll-commonmark-ghpages (= 0.5.1)
58+
jekyll-default-layout (= 0.1.5)
59+
jekyll-feed (= 0.17.0)
4360
jekyll-gist (= 1.5.0)
44-
jekyll-github-metadata (= 2.13.0)
61+
jekyll-github-metadata (= 2.16.1)
4562
jekyll-include-cache (= 0.2.1)
4663
jekyll-mentions (= 1.6.0)
4764
jekyll-optional-front-matter (= 0.3.2)
@@ -68,30 +85,32 @@ GEM
6885
jekyll-theme-tactile (= 0.2.0)
6986
jekyll-theme-time-machine (= 0.2.0)
7087
jekyll-titles-from-headings (= 0.5.3)
71-
jemoji (= 0.12.0)
72-
kramdown (= 2.3.2)
88+
jemoji (= 0.13.0)
89+
kramdown (= 2.4.0)
7390
kramdown-parser-gfm (= 1.1.0)
7491
liquid (= 4.0.4)
7592
mercenary (~> 0.3)
7693
minima (= 2.5.1)
77-
nokogiri (>= 1.13.6, < 2.0)
78-
rouge (= 3.26.0)
94+
nokogiri (>= 1.16.2, < 2.0)
95+
rouge (= 3.30.0)
7996
terminal-table (~> 1.4)
80-
github-pages-health-check (1.17.9)
97+
webrick (~> 1.8)
98+
github-pages-health-check (1.18.2)
8199
addressable (~> 2.3)
82100
dnsruby (~> 1.60)
83-
octokit (~> 4.0)
84-
public_suffix (>= 3.0, < 5.0)
101+
octokit (>= 4, < 8)
102+
public_suffix (>= 3.0, < 6.0)
85103
typhoeus (~> 1.3)
86-
html-pipeline (2.14.2)
104+
html-pipeline (2.14.3)
87105
activesupport (>= 2)
88106
nokogiri (>= 1.4)
89107
http_parser.rb (0.8.0)
90-
i18n (1.14.6)
108+
i18n (1.14.7)
91109
concurrent-ruby (~> 1.0)
92-
jekyll (3.9.3)
110+
jekyll (3.10.0)
93111
addressable (~> 2.4)
94112
colorator (~> 1.0)
113+
csv (~> 3.0)
95114
em-websocket (~> 0.5)
96115
i18n (>= 0.7, < 2)
97116
jekyll-sass-converter (~> 1.0)
@@ -102,27 +121,28 @@ GEM
102121
pathutil (~> 0.9)
103122
rouge (>= 1.7, < 4)
104123
safe_yaml (~> 1.0)
105-
jekyll-avatar (0.7.0)
124+
webrick (>= 1.0)
125+
jekyll-avatar (0.8.0)
106126
jekyll (>= 3.0, < 5.0)
107-
jekyll-coffeescript (1.1.1)
127+
jekyll-coffeescript (1.2.2)
108128
coffee-script (~> 2.2)
109-
coffee-script-source (~> 1.11.1)
129+
coffee-script-source (~> 1.12)
110130
jekyll-commonmark (1.4.0)
111131
commonmarker (~> 0.22)
112-
jekyll-commonmark-ghpages (0.4.0)
113-
commonmarker (~> 0.23.7)
114-
jekyll (~> 3.9.0)
132+
jekyll-commonmark-ghpages (0.5.1)
133+
commonmarker (>= 0.23.7, < 1.1.0)
134+
jekyll (>= 3.9, < 4.0)
115135
jekyll-commonmark (~> 1.4.0)
116136
rouge (>= 2.0, < 5.0)
117-
jekyll-default-layout (0.1.4)
118-
jekyll (~> 3.0)
119-
jekyll-feed (0.15.1)
137+
jekyll-default-layout (0.1.5)
138+
jekyll (>= 3.0, < 5.0)
139+
jekyll-feed (0.17.0)
120140
jekyll (>= 3.7, < 5.0)
121141
jekyll-gist (1.5.0)
122142
octokit (~> 4.2)
123-
jekyll-github-metadata (2.13.0)
143+
jekyll-github-metadata (2.16.1)
124144
jekyll (>= 3.4, < 5.0)
125-
octokit (~> 4.0, != 4.4.0)
145+
octokit (>= 4, < 7, != 4.4.0)
126146
jekyll-include-cache (0.2.1)
127147
jekyll (>= 3.7, < 5.0)
128148
jekyll-mentions (1.6.0)
@@ -193,41 +213,43 @@ GEM
193213
jekyll (>= 3.3, < 5.0)
194214
jekyll-watch (2.2.1)
195215
listen (~> 3.0)
196-
jemoji (0.12.0)
197-
gemoji (~> 3.0)
216+
jemoji (0.13.0)
217+
gemoji (>= 3, < 5)
198218
html-pipeline (~> 2.2)
199219
jekyll (>= 3.0, < 5.0)
200220
json (2.3.0)
201-
kramdown (2.3.2)
221+
kramdown (2.4.0)
202222
rexml
203223
kramdown-parser-gfm (1.1.0)
204224
kramdown (~> 2.0)
205225
liquid (4.0.4)
206-
listen (3.7.1)
226+
listen (3.9.0)
207227
rb-fsevent (~> 0.10, >= 0.10.3)
208228
rb-inotify (~> 0.9, >= 0.9.10)
229+
logger (1.6.6)
209230
mercenary (0.3.6)
210231
minima (2.5.1)
211232
jekyll (>= 3.5, < 5.0)
212233
jekyll-feed (~> 0.9)
213234
jekyll-seo-tag (~> 2.1)
214-
minitest (5.25.4)
235+
minitest (5.25.5)
236+
net-http (0.6.0)
237+
uri
215238
nokogiri (1.18.8-x86_64-linux-gnu)
216239
racc (~> 1.4)
217240
octokit (4.25.1)
218241
faraday (>= 1, < 3)
219242
sawyer (~> 0.9)
220243
pathutil (0.16.2)
221244
forwardable-extended (~> 2.6)
222-
public_suffix (4.0.7)
245+
public_suffix (5.1.1)
223246
racc (1.8.1)
224247
rb-fsevent (0.11.2)
225-
rb-inotify (0.10.1)
248+
rb-inotify (0.11.1)
226249
ffi (~> 1.0)
227-
rexml (3.3.9)
228-
rouge (3.26.0)
229-
ruby2_keywords (0.0.5)
230-
rubyzip (2.3.2)
250+
rexml (3.4.1)
251+
rouge (3.30.0)
252+
rubyzip (2.4.1)
231253
safe_yaml (1.0.5)
232254
sass (3.7.4)
233255
sass-listen (~> 4.0.0)
@@ -237,20 +259,17 @@ GEM
237259
sawyer (0.9.2)
238260
addressable (>= 2.3.5)
239261
faraday (>= 0.17.3, < 3)
240-
simpleidn (0.2.1)
241-
unf (~> 0.1.4)
262+
securerandom (0.4.1)
263+
simpleidn (0.2.3)
242264
terminal-table (1.8.0)
243265
unicode-display_width (~> 1.1, >= 1.1.1)
244-
typhoeus (1.4.0)
266+
typhoeus (1.4.1)
245267
ethon (>= 0.9.0)
246268
tzinfo (2.0.6)
247269
concurrent-ruby (~> 1.0)
248-
unf (0.1.4)
249-
unf_ext
250-
unf_ext (0.0.8.2)
251270
unicode-display_width (1.8.0)
252-
webrick (1.8.2)
253-
zeitwerk (2.7.1)
271+
uri (1.0.3)
272+
webrick (1.9.1)
254273

255274
PLATFORMS
256275
x86_64-linux
@@ -263,7 +282,7 @@ DEPENDENCIES
263282
webrick
264283

265284
RUBY VERSION
266-
ruby 3.1.2p20
285+
ruby 3.4.2p28
267286

268287
BUNDLED WITH
269288
2.3.16

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ title: Bugzilla
22
email: developers@bugzilla.org
33
description: ""
44
baseurl: ""
5-
url: ""
5+
url: "https://bugzilla.org/"
66

77
sass:
88
sass_dir: _sass

_includes/authors.html

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,25 @@
33
{% assign links = "" %}
44
{% for author in include.authors %}
55
{% assign profile = site.developers | where: "nickname", author | first %}
6-
{% capture link %}<a class="muted" href="https://bugzilla.org/about/developers/{{ profile.nickname }}" target="_blank">{{ profile.firstname }} {{ profile.lastname }} ({{ profile.nickname }})</a>,{% endcapture %}
6+
{%- capture link -%}
7+
<a
8+
class="muted"
9+
href="{{ "/about/developers/" | append: profile.nickname | absolute_url }}"
10+
target="_blank">
11+
{{ profile.firstname }} {{ profile.lastname }} ({{ profile.nickname }})
12+
</a>,
13+
{%- endcapture -%}
714
{% assign links = links | append: link %}
815
{% endfor %}
916
{% assign output = links | split: ',' | array_to_sentence_string %}
1017
{% else %}
11-
{% capture output %}<a class="muted" href="https://bugzilla.org/about/developers/" target="_blank">Bugzilla Team</a>{% endcapture %}
18+
{%- capture output -%}
19+
<a
20+
class="muted"
21+
href="{{ "/about/developers/" | absolute_url }}"
22+
target="_blank">
23+
Bugzilla Team
24+
</a>
25+
{%- endcapture -%}
1226
{% endif %}
1327
<p class="authors muted">by {{ output }}</p>

_includes/head.html

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
{% if include.page.title %}
44
{%- assign title = include.page.title -%}
55
{%- endif -%}
6-
{%- capture image %}{{ site.url }}/assets/img/banner.png{% endcapture -%}
6+
{%- capture image %}{{ "/assets/img/banner.png" | absolute_url }}{% endcapture -%}
77
{% if include.page.image %}
88
{% if include.page.ogtype == "profile" %}
9-
{%- capture image %}{{ site.url }}/assets/img/developers/{{ include.page.image }}{% endcapture -%}
9+
{%- capture image %}{{ "/assets/img/developers" | append: include.page.image | absolute_url }}{% endcapture -%}
1010
{% else %}
11-
{%- capture image %}{{ site.url }}{{ include.page.image }}{% endcapture %}
11+
{%- capture image %}{{ include.page.image | absolute_url }}{% endcapture -%}
1212
{% endif %}
1313
{%- endif -%}
1414
{% assign description = site.description %}
@@ -21,27 +21,37 @@
2121
{% if include.page.ogtype == "profile" %}
2222
{% capture description %}{% if include.page.former %}Former {% endif %}{{ include.page.role }}{% endcapture %}
2323
{% endif %}
24-
{%- capture canonical %}{{ site.url }}{{ include.page.url | replace:'index.html',''}}{% endcapture %}
24+
{%- capture canonical -%}
25+
{{ include.page.url | replace:'index.html','' | absolute_url }}
26+
{%- endcapture -%}
2527
<title>{% if include.page.title != True %}{{ include.page.title }} - {% endif %}{{ site.title }}</title>
2628
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
2729
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
2830
<meta name="keywords" content="bugzilla bug track tracking enterprise solution">
29-
<link rel="icon" href="/assets/favicon/favicon.ico" type="image/ico">
30-
<link rel="stylesheet" type="text/css" href="/assets/css/global.css">
31-
<link rel="stylesheet" type="text/css" href="/assets/css/addon.css">
32-
<script defer src="/assets/js/global.js"></script>
33-
{% for addon in include.page.addons %}
31+
<link rel="icon" href="{{ "/assets/favicon/favicon.ico" | absolute_url }}" type="image/ico">
32+
<link rel="stylesheet" type="text/css" href="{{ "/assets/css/global.css" | absolute_url }}">
33+
<link rel="stylesheet" type="text/css" href="{{ "/assets/css/addon.css" | absolute_url }}">
34+
<script defer src="{{ "/assets/js/global.js" | absolute_url }}"></script>
35+
{%- for addon in include.page.addons -%}
3436
{% case addon.type %}
3537
{% when 'js' %}
36-
<script defer src="{{ addon.link }}"></script>
38+
<script defer src="{{ addon.link | absolute_url }}"></script>
3739
{% when 'css' %}
38-
<link defer rel="stylesheet" type="text/css" href="{{ addon.link }}" {% if addon.media %}media="{{ addon.media }}"{% endif %}>
40+
<link
41+
defer
42+
rel="stylesheet"
43+
type="text/css"
44+
href="{{ addon.link | absolute_url }}"
45+
{% if addon.media %}media="{{ addon.media }}"{% endif %}>
3946
{% endcase %}
40-
{% endfor %}
47+
{%- endfor -%}
4148
{% for meta in include.page.meta %}
4249
<{{ meta.type }} {{ meta.tags }}>
4350
{% endfor %}
44-
<link color="#9248c8" href="/assets/favicon/mask-icon.svg" rel="mask-icon">
51+
<link
52+
color="#9248c8"
53+
href="{{ "/assets/favicon/mask-icon.svg" | absolute_url }}"
54+
rel="mask-icon">
4555
<meta property="og:site_name" content="{{ site.title }}">
4656
<meta property="og:title" content="{{ title }}">
4757
<meta property="og:description" content="{{ description }}" />
@@ -50,7 +60,8 @@
5060
{%- when "article" %}
5161
<meta property="article:published_time" content="{{ include.page.date | date_to_xmlschema }}">
5262
{% for author in include.page.author -%}
53-
<meta property="article:author" content="{{ site.url }}/developers/{{ author }}">
63+
<meta property="article:author"
64+
content="{{ "/developers/" | append: author | absolute_url }}">
5465
{%- endfor %}
5566
{% for tag in include.page.tags -%}
5667
<meta property="article:tag" content="{{ tag }}">
@@ -71,6 +82,5 @@
7182
<meta name="twitter:site" content="@bugzilla"/>
7283
<meta name="twitter:creator" content="{% if include.page.twitter %}{{ include.page.twitter }}{% else %}@bugzilla{% endif %}"/>
7384
<meta name="theme-color" content="#9248c8">
74-
7585
<link rel="canonical" href="{{ canonical }}">
7686
</head>

0 commit comments

Comments
 (0)