Skip to content

Commit 0e21082

Browse files
committed
use liquid veriable site.baseurl for assets to load
1 parent 8427516 commit 0e21082

1 file changed

Lines changed: 24 additions & 43 deletions

File tree

_includes/head.html

Lines changed: 24 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,28 @@
22
<title>{{ page.title }}</title>
33
<meta charset="utf-8">
44
<meta name="viewport" content="width=device-width, initial-scale=1">
5-
<link
6-
rel="preload"
7-
href="/fonts/open-sans/woff2/open-sans-latin-wght-normal.woff2"
8-
as="font"
9-
type="font/woff2"
10-
crossorigin
11-
/>
12-
<link
13-
rel="preload"
14-
href="/fonts/open-sans/woff2/open-sans-latin-wght-italic.woff2"
15-
as="font"
16-
type="font/woff2"
17-
crossorigin
18-
/>
19-
<link
20-
href="/fonts/open-sans/woff/OpenSans.woff"
21-
as="font"
22-
type="font/woff"
23-
crossorigin
24-
/>
25-
<link
26-
href="/fonts/open-sans/woff/OpenSans-Italic.woff"
27-
as="font"
28-
type="font/woff"
29-
crossorigin
30-
/>
31-
<link rel="stylesheet" href="/fonts/open-sans/fonts.css" />
32-
<link rel="icon" type="image/png" href="/images/favicon.png" />
33-
<script data-cfasync="false" src="/js/theme.js"></script>
34-
<link rel="stylesheet" href="/css/variables.css?_={{ site.time | date: '%s' }}">
35-
<link rel="stylesheet" href="/css/themes/dark-theme.css?_={{ site.time | date: '%s' }}">
36-
<link rel="stylesheet" href="/css/style.css?_={{ site.time | date: '%s' }}">
37-
<link rel="stylesheet" href="/css/sintax.css?_={{ site.time | date: '%s' }}">
38-
<link rel="stylesheet" href="/css/langs/{{ page.lang }}.css">
5+
<link rel="preload" href="{{ site.baseurl }}/fonts/open-sans/woff2/open-sans-latin-wght-normal.woff2" as="font"
6+
type="font/woff2" crossorigin />
7+
<link rel="preload" href="{{ site.baseurl }}/fonts/open-sans/woff2/open-sans-latin-wght-italic.woff2" as="font"
8+
type="font/woff2" crossorigin />
9+
<link href="{{ site.baseurl }}/fonts/open-sans/woff/OpenSans.woff" as="font" type="font/woff" crossorigin />
10+
<link href="{{ site.baseurl }}/fonts/open-sans/woff/OpenSans-Italic.woff" as="font" type="font/woff" crossorigin />
11+
<link rel="stylesheet" href="{{ site.baseurl }}/fonts/open-sans/fonts.css" />
12+
<link rel="icon" type="image/png" href="{{ site.baseurl }}/images/favicon.png" />
13+
<script data-cfasync="false" src="{{ site.baseurl }}/js/theme.js"></script>
14+
<link rel="stylesheet" href="{{ site.baseurl }}/css/variables.css?_={{ site.time | date: '%s' }}">
15+
<link rel="stylesheet" href="{{ site.baseurl }}/css/themes/dark-theme.css?_={{ site.time | date: '%s' }}">
16+
<link rel="stylesheet" href="{{ site.baseurl }}/css/style.css?_={{ site.time | date: '%s' }}">
17+
<link rel="stylesheet" href="{{ site.baseurl }}/css/sintax.css?_={{ site.time | date: '%s' }}">
18+
<link rel="stylesheet" href="{{ site.baseurl }}/css/langs/{{ page.lang }}.css">
3919
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4020
<meta name="description" content="{{page.description}}">
4121
<meta property="og:url" content="https://expressjs.com{{page.url}}">
4222
{% if page.authors %}
43-
<meta property="og:type" content="article">
44-
{%- for author in page.authors %}
45-
<meta property="og:article:author" content="{{author.name}}">
46-
{%- endfor %}
23+
<meta property="og:type" content="article">
24+
{%- for author in page.authors %}
25+
<meta property="og:article:author" content="{{author.name}}">
26+
{%- endfor %}
4727
{% else %}
4828
<meta property="og:type" content="website">
4929
{% endif %}
@@ -64,10 +44,11 @@
6444
{% else %}
6545
<meta property="twitter:image" content="https://expressjs.com/images/og.png">
6646
{% endif %}
67-
<script data-cfasync="false" defer src="/js/app.js"></script>
68-
<script data-cfasync="false" defer src="/js/menu.js"></script>
69-
<script data-cfasync="false" defer src="/js/copycode.js"></script>
47+
<script data-cfasync="false" defer src="{{ site.baseurl }}/js/app.js"></script>
48+
<script data-cfasync="false" defer src="{{ site.baseurl }}/js/menu.js"></script>
49+
<script data-cfasync="false" defer src="{{ site.baseurl }}/js/copycode.js"></script>
7050
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
71-
<link rel="alternate" type="application/atom+xml" href="/feed.xml" title="Express Blog" />
72-
<link rel="alternate" type="application/atom+xml" href="/vulnerabilities.xml" title="Express Vulnerabilities" />
51+
<link rel="alternate" type="application/atom+xml" href="{{ site.baseurl }}/feed.xml" title="Express Blog" />
52+
<link rel="alternate" type="application/atom+xml" href="{{ site.baseurl }}/vulnerabilities.xml"
53+
title="Express Vulnerabilities" />
7354
</head>

0 commit comments

Comments
 (0)