Skip to content

Commit 1c915ff

Browse files
committed
Use url filter for links and files
1 parent 5b338e4 commit 1c915ff

File tree

7 files changed

+29
-29
lines changed

7 files changed

+29
-29
lines changed

src/globals/site.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "JavaScriptMN",
3-
"description": "A Monthly Meetup For Anyone Interested In Javascript And Related Technologies In The Twin Cities.",
3+
"description": "A monthly meetup for anyone interested in JavaScript and related technologies in the Twin Cities.",
44
"url": "https://javascriptmn.com",
55
"baseUrl": "/",
66
"author": {
@@ -10,19 +10,19 @@
1010
},
1111
"navigation": [
1212
{
13-
"path": "",
13+
"path": "/",
1414
"text": "Home"
1515
},
1616
{
17-
"path": "sponsors",
17+
"path": "/sponsors/",
1818
"text": "Sponsors"
1919
},
2020
{
21-
"path": "code-of-conduct",
21+
"path": "/code-of-conduct/",
2222
"text": "Code of Conduct"
2323
},
2424
{
25-
"path": "speak",
25+
"path": "/speak/",
2626
"text": "Speak"
2727
}
2828
],

src/globals/sponsors.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"section": "Host 🌎",
55
"sponsors": [
66
{
7-
"imgSrc": "logo-wework.svg",
7+
"imgSrc": "/sponsors/logo-wework.svg",
88
"href": "https://www.wework.com",
99
"title": "WeWork"
1010
}
@@ -15,22 +15,22 @@
1515
"section": "Diamond 💎",
1616
"sponsors": [
1717
{
18-
"imgSrc": "logo-twilio.svg",
18+
"imgSrc": "/sponsors/logo-twilio.svg",
1919
"href": "https://twilio.com",
2020
"title": "Twilio"
2121
},
2222
{
23-
"imgSrc": "logo-trackjs.svg",
23+
"imgSrc": "/sponsors/logo-trackjs.svg",
2424
"href": "https://trackjs.com",
2525
"title": "TrackJS"
2626
},
2727
{
28-
"imgSrc": "logo-frontend-masters.svg",
28+
"imgSrc": "/sponsors/logo-frontend-masters.svg",
2929
"href": "https://frontendmasters.com",
3030
"title": "Frontend Masters"
3131
},
3232
{
33-
"imgSrc": "logo-ch-robinson.svg",
33+
"imgSrc": "/sponsors/logo-ch-robinson.svg",
3434
"href": "https://www.chrobinson.com",
3535
"title": "C.H. Robinson"
3636
}

src/includes/footer.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<ul>
1414
{% for link in site.navigation %}
1515
<li>
16-
<a class="hover:underline" href="{{ site.baseUrl }}{{ link.path }}"
16+
<a class="hover:underline" href="{{ link.path | url }}"
1717
>{{ link.text }}</a
1818
>
1919
</li>

src/includes/header.njk

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,20 @@
4444
class="flex-1 flex items-center justify-center sm:items-stretch sm:justify-between"
4545
>
4646
<div class="flex-shrink-0">
47-
<a href="{{ site.baseUrl }}" class="flex lg:hidden w-auto">
47+
<a href="{{ '/' | url }}" class="flex lg:hidden w-auto">
4848
<img
4949
class="h-8"
50-
src="{{ site.baseUrl }}jsmn-logo.svg"
50+
src="{{ '/jsmn-logo.svg' | url }}"
5151
alt="{{ site.name }} logo"
5252
/>
5353
</a>
5454
<a
55-
href="{{ site.baseUrl }}"
55+
href="{{ '/' | url }}"
5656
class="hidden lg:flex items-center w-auto"
5757
>
5858
<img
5959
class="h-8 block"
60-
src="{{ site.baseUrl }}jsmn-logo.svg"
60+
src="{{ '/jsmn-logo.svg' | url }}"
6161
alt="{{ site.name }} logo"
6262
/>
6363
<span class="text-white font-bold block pl-4">{{ site.name }}</span>
@@ -67,7 +67,7 @@
6767
<div class="flex">
6868
{% for link in site.navigation %}
6969
<a
70-
href="{{ site.baseUrl }}{{ link.path }}"
70+
href="{{ link.path | url }}"
7171
class="ml-4 px-3 py-2 text-sm font-medium leading-5 text-gray-300 hover:text-white hover:bg-gray-700 focus:outline-none focus:text-white focus:bg-gray-700 transition duration-150 ease-in-out"
7272
>{{ link.text }}</a
7373
>
@@ -81,7 +81,7 @@
8181
<div class="px-2 pt-2 pb-3">
8282
{% for link in site.navigation %}
8383
<a
84-
href="{{ site.baseUrl }}{{ link.path }}"
84+
href="{{ link.path | url }}"
8585
class="mt-1 block px-3 py-2 text-base font-medium text-gray-300 hover:text-white hover:bg-gray-700 focus:outline-none focus:text-white focus:bg-gray-700 transition duration-150 ease-in-out"
8686
>{{ link.text }}</a
8787
>

src/includes/layouts/base.njk

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<meta
88
name="description"
9-
content="A monthly meetup for anyone interested in JavaScript and related technologies in the Twin Cities."
9+
content="{{ site.description }}"
1010
/>
1111
<title>
1212
{{ title }}{{ "" if title === "JavaScriptMN" else " | JavaScriptMN" }}
@@ -24,22 +24,22 @@
2424
<link
2525
rel="apple-touch-icon"
2626
sizes="180x180"
27-
href="{{ site.baseUrl }}apple-touch-icon.png"
27+
href="{{ '/apple-touch-icon.png' | url }}"
2828
/>
2929
<link
3030
rel="icon"
3131
type="image/png"
3232
sizes="32x32"
33-
href="{{ site.baseUrl }}favicon-32x32.png"
33+
href="{{ '/favicon-32x32.png' | url }}"
3434
/>
3535
<link
3636
rel="icon"
3737
type="image/png"
3838
sizes="16x16"
39-
href="{{ site.baseUrl }}favicon-16x16.png"
39+
href="{{ '/favicon-16x16.png' | url }}"
4040
/>
41-
<link rel="manifest" href="{{ site.baseUrl }}site.webmanifest" />
42-
<link rel="stylesheet" href="{{ site.baseUrl }}css/tailwind.include.css" />
41+
<link rel="manifest" href="{{ '/site.webmanifest' | url }}" />
42+
<link rel="stylesheet" href="{{ '/css/tailwind.include.css' | url }}" />
4343
</head>
4444
<body>
4545
{% include "header.njk" %}

src/index.njk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ title: JavaScriptMN
129129
<div className="w-full sm:w-auto">
130130
<a
131131
class="block text-xl font-semibold border-2 border-black p-4 hover:bg-jsmn-yellow transition-all duration-100"
132-
href="/speak"
132+
href="{{ '/speak/' | url }}"
133133
>Learn More</a
134134
>
135135
</div>
@@ -145,7 +145,7 @@ title: JavaScriptMN
145145
Sponsors
146146
</h2>
147147
<p>
148-
<a class="hover:underline" href="{{ site.baseUrl }}sponsors/">
148+
<a class="hover:underline" href="{{ '/sponsors/' | url }}">
149149
More Sponsors →
150150
</a>
151151
</p>
@@ -165,7 +165,7 @@ title: JavaScriptMN
165165
class="flex justify-center items-center shadow transition-all border border-gray-200 hover:border-gray-400 w-full p-4"
166166
>
167167
<img
168-
src="{{ site.baseUrl }}sponsors/{{ sponsor.imgSrc }}"
168+
src="{{ sponsor.imgSrc | url }}"
169169
alt="{{ sponsor.title }}"
170170
title="{{ sponsor.title }}"
171171
class="h-32"

src/sponsors.njk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ title: Sponsors
1414
>
1515
Sponsors
1616
</h1>
17-
<p><a class="hover:underline" href="{{ site.baseUrl }}sponsorship-opportunities/">Become a sponsor →</a></p>
17+
<p><a class="hover:underline" href="{{ '/sponsorship-opportunities/' | url }}">Become a sponsor →</a></p>
1818
</div>
1919

2020
<div class="border-jsmn-yellow border-4 p-4 divide-y divide-gray-200">
@@ -31,7 +31,7 @@ title: Sponsors
3131
class="flex justify-center items-center shadow transition-all border border-gray-200 hover:border-gray-400 w-full p-4 m-2"
3232
>
3333
<img
34-
src="{{ site.baseUrl }}sponsors/{{ sponsor.imgSrc }}"
34+
src="{{ sponsor.imgSrc | url }}"
3535
alt="{{ sponsor.title }}"
3636
title="{{ sponsor.title }}"
3737
class="h-32"
@@ -44,7 +44,7 @@ title: Sponsors
4444
>
4545
<a
4646
class="transition-all transform hover:scale-110 h-32 w-full flex justify-center items-center"
47-
href="{{ site.baseUrl }}sponsorship-opportunities"
47+
href="{{ '/sponsorship-opportunities/' | url }}"
4848
>
4949
<span class="text-lg font-bold">Become a sponsor →</span>
5050
</a>

0 commit comments

Comments
 (0)