Skip to content

Commit 8a1f3c4

Browse files
committed
Replace all internal .Permalink usages with .RelPermalink in layout templates
Absolute Permalink embeds the baseURL (https://powershell.org), breaking navigation on Netlify deploy previews and any non-production deployment. RelPermalink gives a root-relative path that works on every domain. Excluded: OG/Twitter meta tags and social share URLs in baseof.html and single.html which intentionally need absolute URLs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vQdwS6gqbFhxk55vCFPcD
1 parent a8f89bf commit 8a1f3c4

6 files changed

Lines changed: 19 additions & 19 deletions

File tree

themes/powershell-community/layouts/_default/calendar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ <h1 class="text-4xl lg:text-5xl font-bold mb-2">{{ .Title }}</h1>
1111
<p class="text-xl opacity-90 max-w-2xl mx-auto">{{ .Params.description }}</p>
1212
{{ with .OutputFormats.Get "Calendar" }}
1313
<div class="mt-6">
14-
<a href="{{ .Permalink }}" class="inline-flex items-center bg-white bg-opacity-20 hover:bg-opacity-30 text-white px-5 py-2 rounded-lg font-medium transition-colors duration-200">
14+
<a href="{{ .RelPermalink }}" class="inline-flex items-center bg-white bg-opacity-20 hover:bg-opacity-30 text-white px-5 py-2 rounded-lg font-medium transition-colors duration-200">
1515
<i class="fas fa-calendar-plus mr-2"></i>Subscribe (.ics)
1616
</a>
1717
</div>

themes/powershell-community/layouts/_default/list.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ <h1 class="text-4xl lg:text-5xl font-bold mb-2">
7070
{{ end }}
7171
</div>
7272
<h2 class="text-xl font-bold text-gray-900 mb-3">
73-
<a href="{{ .Permalink }}" class="hover:text-purple-600 transition-colors duration-200">
73+
<a href="{{ .RelPermalink }}" class="hover:text-purple-600 transition-colors duration-200">
7474
{{ .Title }}
7575
</a>
7676
</h2>
7777
<p class="text-gray-600 mb-4 line-clamp-3">{{ .Summary }}</p>
7878
<div class="flex items-center space-x-4">
79-
<a href="{{ .Permalink }}"
79+
<a href="{{ .RelPermalink }}"
8080
class="inline-flex items-center bg-purple-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-purple-700 transition-colors duration-200">
8181
<i class="fas fa-play mr-2"></i>Listen
8282
</a>
@@ -112,15 +112,15 @@ <h2 class="text-xl font-bold text-gray-900 mb-3">
112112
</div>
113113

114114
<h2 class="text-xl font-bold text-gray-900 mb-3">
115-
<a href="{{ .Permalink }}" class="hover:text-blue-600 transition-colors duration-200">
115+
<a href="{{ .RelPermalink }}" class="hover:text-blue-600 transition-colors duration-200">
116116
{{ .Title }}
117117
</a>
118118
</h2>
119119

120120
<p class="text-gray-600 mb-4 line-clamp-3">{{ .Summary }}</p>
121121

122122
<div class="flex items-center justify-between">
123-
<a href="{{ .Permalink }}"
123+
<a href="{{ .RelPermalink }}"
124124
class="inline-flex items-center text-blue-600 font-medium hover:text-blue-700 transition-colors duration-200">
125125
Read More <i class="fas fa-arrow-right ml-2"></i>
126126
</a>

themes/powershell-community/layouts/_default/single.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ <h3 class="text-2xl font-bold text-gray-900 mb-6">Related Articles</h3>
146146
<div class="p-6">
147147
<div class="text-sm text-gray-500 mb-2">{{ .Date.Format "Jan 2, 2006" }}</div>
148148
<h4 class="text-lg font-semibold text-gray-900 mb-3 line-clamp-2">
149-
<a href="{{ .Permalink }}" class="hover:text-blue-600 transition-colors duration-200">
149+
<a href="{{ .RelPermalink }}" class="hover:text-blue-600 transition-colors duration-200">
150150
{{ .Title }}
151151
</a>
152152
</h4>
@@ -157,22 +157,22 @@ <h4 class="text-lg font-semibold text-gray-900 mb-3 line-clamp-2">
157157
</div>
158158
</div>
159159
{{ end }}
160-
160+
161161
<!-- Navigation -->
162162
<nav class="mt-8 pt-6 border-t border-gray-200">
163163
<div class="flex justify-between items-center">
164164
{{ with .PrevInSection }}
165-
<a href="{{ .Permalink }}"
165+
<a href="{{ .RelPermalink }}"
166166
class="flex items-center text-blue-600 hover:text-blue-700 font-medium transition-colors duration-200">
167167
<i class="fas fa-chevron-left mr-2"></i>
168168
<span class="truncate max-w-xs">{{ .Title }}</span>
169169
</a>
170170
{{ else }}
171171
<div></div>
172172
{{ end }}
173-
173+
174174
{{ with .NextInSection }}
175-
<a href="{{ .Permalink }}"
175+
<a href="{{ .RelPermalink }}"
176176
class="flex items-center text-blue-600 hover:text-blue-700 font-medium transition-colors duration-200">
177177
<span class="truncate max-w-xs">{{ .Title }}</span>
178178
<i class="fas fa-chevron-right ml-2"></i>

themes/powershell-community/layouts/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,12 @@ <h2 class="text-3xl font-bold text-gray-900 mb-2">Latest Podcast Episodes</h2>
163163
{{ .Date.Format "Jan 2, 2006" }}
164164
</div>
165165
<h3 class="text-lg font-semibold text-gray-900 mb-3 line-clamp-2">
166-
<a href="{{ .Permalink }}" class="hover:text-blue-600 transition-colors duration-200">
166+
<a href="{{ .RelPermalink }}" class="hover:text-blue-600 transition-colors duration-200">
167167
{{ .Title }}
168168
</a>
169169
</h3>
170170
<p class="text-gray-600 mb-4 line-clamp-3">{{ .Summary }}</p>
171-
<a href="{{ .Permalink }}"
171+
<a href="{{ .RelPermalink }}"
172172
class="inline-flex items-center text-blue-600 font-medium hover:text-blue-700">
173173
Listen Now <i class="fas fa-play ml-2"></i>
174174
</a>
@@ -207,7 +207,7 @@ <h2 class="text-3xl font-bold text-gray-900 mb-2">Recent Articles</h2>
207207
{{ end }}
208208
</div>
209209
<h3 class="text-lg font-semibold text-gray-900 mb-3 line-clamp-2">
210-
<a href="{{ .Permalink }}" class="hover:text-blue-600 transition-colors duration-200">
210+
<a href="{{ .RelPermalink }}" class="hover:text-blue-600 transition-colors duration-200">
211211
{{ .Title }}
212212
</a>
213213
</h3>

themes/powershell-community/layouts/podcast/list.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ <h1 class="text-4xl lg:text-5xl font-bold mb-2">{{ .Site.Params.podcast.title }}
6060
{{ end }}
6161
</div>
6262
<h2 class="text-xl lg:text-2xl font-bold text-gray-900 mb-3">
63-
<a href="{{ .Permalink }}" class="hover:text-purple-600 transition-colors duration-200">
63+
<a href="{{ .RelPermalink }}" class="hover:text-purple-600 transition-colors duration-200">
6464
{{ .Title }}
6565
</a>
6666
</h2>
6767
<p class="text-gray-600 mb-4 line-clamp-3">{{ .Summary }}</p>
6868
<div class="flex flex-wrap items-center gap-4">
69-
<a href="{{ .Permalink }}"
69+
<a href="{{ .RelPermalink }}"
7070
class="inline-flex items-center bg-purple-600 text-white px-4 py-2 rounded-lg font-medium hover:bg-purple-700 transition-colors duration-200">
7171
<i class="fas fa-play mr-2"></i>Listen Now
7272
</a>

themes/powershell-community/layouts/taxonomy/author.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ <h2 class="text-3xl font-bold text-gray-900">{{ .Title }}</h2>
7171
{{ end }}
7272
</div>
7373
<h2 class="text-xl lg:text-2xl font-bold text-gray-900 mb-3">
74-
<a href="{{ .Permalink }}" class="hover:text-purple-600 transition-colors duration-200">
74+
<a href="{{ .RelPermalink }}" class="hover:text-purple-600 transition-colors duration-200">
7575
{{ .Title }}
7676
</a>
7777
</h2>
7878
<p class="text-gray-600 mb-4 line-clamp-3">{{ .Summary }}</p>
7979
<div class="flex flex-wrap items-center gap-4">
80-
<a href="{{ .Permalink }}"
80+
<a href="{{ .RelPermalink }}"
8181
class="inline-flex items-center bg-purple-600 text-white px-4 py-2 rounded-lg font-medium hover:bg-purple-700 transition-colors duration-200">
8282
<i class="fas fa-play mr-2"></i>Listen to Episode
8383
</a>
@@ -104,13 +104,13 @@ <h2 class="text-xl lg:text-2xl font-bold text-gray-900 mb-3">
104104
{{ end }}
105105
</div>
106106
<h2 class="text-xl lg:text-2xl font-bold text-gray-900 mb-3">
107-
<a href="{{ .Permalink }}" class="hover:text-blue-600 transition-colors duration-200">
107+
<a href="{{ .RelPermalink }}" class="hover:text-blue-600 transition-colors duration-200">
108108
{{ .Title }}
109109
</a>
110110
</h2>
111111
<p class="text-gray-600 mb-4 line-clamp-3">{{ .Summary }}</p>
112112
<div class="flex flex-wrap items-center gap-4">
113-
<a href="{{ .Permalink }}"
113+
<a href="{{ .RelPermalink }}"
114114
class="inline-flex items-center bg-blue-600 text-white px-4 py-2 rounded-lg font-medium hover:bg-blue-700 transition-colors duration-200">
115115
<i class="fas fa-book mr-2"></i>Read Article
116116
</a>

0 commit comments

Comments
 (0)