Skip to content

Commit 66b4195

Browse files
Replace hardcoded URLs with site params and link author names (#25)
## Summary - Adds `social.forums` and `github_repo` to `hugo.yaml` params so all community URLs are managed in one place - Replaces hardcoded `https://forums.powershell.org` in `footer.html`, `index.html` (×2) with `{{ .Site.Params.social.forums }}` - Replaces hardcoded YouTube, PowerShell Summit, and GitHub repo URLs in `learning.html` with their existing site param equivalents - Replaces hardcoded GitHub issue URL in `calendar.html` with `{{ .Site.Params.github_repo }}/issues/new?...` - Makes all author name references in `single.html`, `list.html`, and `index.html` render as links to `/authors/[slug]/` instead of plain text ## Test plan - [ ] Build the site locally (`hugo server`) and verify no broken links on homepage, footer, learning, and calendar pages - [ ] Click an author name on an article card (homepage), article list page, and single article page — each should navigate to the correct `/authors/[slug]/` page - [ ] Verify the Forums link in the footer and homepage resolves to `https://forums.powershell.org` - [ ] Update `social.forums` or `github_repo` in `hugo.yaml` and confirm all references update automatically 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017vQdwS6gqbFhxk55vCFPcD --- _Generated by [Claude Code](https://claude.ai/code/session_017vQdwS6gqbFhxk55vCFPcD)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2d3e414 commit 66b4195

10 files changed

Lines changed: 36 additions & 32 deletions

File tree

hugo.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ params:
113113
github: "https://github.com/powershellOrg"
114114
discord: "https://aka.ms/psdiscord"
115115
bluesky: "https://bsky.app/profile/powershell.org"
116+
forums: "https://forums.powershell.org"
117+
118+
# GitHub repository URL
119+
github_repo: "https://github.com/PowerShellOrg/PowerShellOrgWebsite"
116120

117121
# Podcast settings
118122
podcast:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ <h1 class="text-4xl lg:text-5xl font-bold mb-2">{{ .Title }}</h1>
4646

4747
<!-- Author Info -->
4848
<h2 class="text-2xl font-bold text-center text-gray-900 mb-2">
49-
<a href="{{ .Page.Permalink }}" class="hover:text-blue-600 transition-colors duration-200">
49+
<a href="{{ .Page.RelPermalink }}" class="hover:text-blue-600 transition-colors duration-200">
5050
{{ .Page.Title }}
5151
</a>
5252
</h2>
@@ -58,7 +58,7 @@ <h2 class="text-2xl font-bold text-center text-gray-900 mb-2">
5858
</p>
5959

6060
<!-- View Profile Button -->
61-
<a href="{{ .Page.Permalink }}"
61+
<a href="{{ .Page.RelPermalink }}"
6262
class="block w-full bg-blue-600 text-white text-center px-4 py-2 rounded-lg font-medium hover:bg-blue-700 transition-colors duration-200">
6363
<i class="fas fa-arrow-right mr-2"></i>View Profile
6464
</a>

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

Lines changed: 2 additions & 2 deletions
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>
@@ -146,7 +146,7 @@ <h3 class="font-semibold text-gray-700">{{ .Title }}</h3>
146146
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center text-white">
147147
<h2 class="text-3xl font-bold mb-2">Have an Event to Share?</h2>
148148
<p class="text-xl mb-6 opacity-90">Submit your PowerShell-related conference, meetup, or community event by opening a GitHub issue.</p>
149-
<a href="https://github.com/PowerShellOrg/PowerShellOrgWebsite/issues/new?template=community-event.yml" target="_blank" rel="noopener"
149+
<a href="{{ .Site.Params.github_repo }}/issues/new?template=community-event.yml" target="_blank" rel="noopener"
150150
class="inline-flex items-center bg-white text-purple-600 px-6 py-3 rounded-lg font-semibold hover:bg-gray-100 transition-colors duration-200">
151151
<i class="fab fa-github mr-2"></i>Submit an Event
152152
</a>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ <h2 class="text-3xl font-bold text-gray-900">Videos & YouTube</h2>
7979
</div>
8080
<div class="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
8181

82-
<a href="https://youtube.com/PowerShellOrg" target="_blank" rel="noopener"
82+
<a href="{{ .Site.Params.social.youtube }}" target="_blank" rel="noopener"
8383
class="block bg-white rounded-xl p-6 border border-gray-200 hover:border-red-400 hover:shadow-md transition-all duration-200">
8484
<div class="flex items-start">
8585
<div class="w-10 h-10 bg-red-600 rounded-lg flex items-center justify-center flex-shrink-0 mr-4">
@@ -175,7 +175,7 @@ <h2 class="text-3xl font-bold text-gray-900">Recommended Conferences</h2>
175175
</div>
176176
<div class="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
177177

178-
<a href="https://powershellsummit.org" target="_blank" rel="noopener"
178+
<a href="{{ .Site.Params.summit.registration_url }}" target="_blank" rel="noopener"
179179
class="block bg-gray-50 rounded-xl overflow-hidden border border-gray-200 hover:border-blue-400 hover:shadow-md transition-all duration-200">
180180
<div class="bg-gradient-to-r from-blue-600 to-blue-800 p-6 text-white">
181181
<i class="fas fa-terminal text-3xl mb-3"></i>
@@ -226,7 +226,7 @@ <h3 class="text-xl font-bold">SQL Saturday Baton Rouge</h3>
226226
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center text-white">
227227
<h2 class="text-3xl font-bold mb-2">Know a Great Resource?</h2>
228228
<p class="text-xl mb-6 opacity-90">Help us grow this list. Submit a pull request to add your favorite PowerShell learning resources.</p>
229-
<a href="https://github.com/PowerShellOrg/PowerShellOrgWebsite" target="_blank" rel="noopener"
229+
<a href="{{ .Site.Params.github_repo }}" target="_blank" rel="noopener"
230230
class="inline-flex items-center bg-white text-green-600 px-6 py-3 rounded-lg font-semibold hover:bg-gray-100 transition-colors duration-200">
231231
<i class="fab fa-github mr-2"></i>Contribute on GitHub
232232
</a>

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

Lines changed: 5 additions & 5 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>
@@ -101,7 +101,7 @@ <h2 class="text-xl font-bold text-gray-900 mb-3">
101101
<time>{{ .Date.Format "Jan 2, 2006" }}</time>
102102
{{ with .Params.author }}
103103
<span></span>
104-
<span>{{ . }}</span>
104+
<a href="{{ "/authors/" | relURL }}{{ . | urlize }}/" class="hover:text-blue-600 transition-colors duration-200">{{ . }}</a>
105105
{{ end }}
106106
</div>
107107
{{ with .Params.categories }}
@@ -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: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ <h1 class="text-3xl lg:text-4xl font-bold text-gray-900 mb-4 leading-tight">{{ .
5050
<div class="w-8 h-8 bg-blue-600 rounded-full flex items-center justify-center mr-3">
5151
<i class="fas fa-user text-white text-sm"></i>
5252
</div>
53-
<span class="font-medium">{{ . }}</span>
53+
<a href="{{ "/authors/" | relURL }}{{ . | urlize }}/" class="font-medium hover:text-blue-600 transition-colors duration-200">{{ . }}</a>
5454
</div>
5555
{{ end }}
5656
<span class="text-gray-400"></span>
@@ -127,7 +127,7 @@ <h3 class="text-lg font-semibold text-gray-900 mb-3">Tags</h3>
127127
<i class="fas fa-user text-white text-xl"></i>
128128
</div>
129129
<div class="flex-1">
130-
<h3 class="text-lg font-semibold text-gray-900 mb-2">About {{ $.Params.author }}</h3>
130+
<h3 class="text-lg font-semibold text-gray-900 mb-2">About <a href="{{ "/authors/" | relURL }}{{ $.Params.author | urlize }}/" class="hover:text-blue-600 transition-colors duration-200">{{ $.Params.author }}</a></h3>
131131
<p class="text-gray-600">{{ . }}</p>
132132
</div>
133133
</div>
@@ -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: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ <h3 class="text-lg font-bold text-gray-800 mb-4 flex items-center">
109109
</div>
110110

111111
<div class="mt-4 pt-4 border-t border-gray-200">
112-
<a href="https://forums.powershell.org"
112+
<a href="{{ .Site.Params.social.forums }}"
113113
class="text-blue-600 hover:text-blue-700 text-sm font-bold flex items-center transition-colors">
114114
<i class="fas fa-comments mr-2"></i>
115115
Visit Forums →
@@ -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,15 +207,15 @@ <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>
214214
<p class="text-gray-600 mb-4 line-clamp-3">{{ .Summary }}</p>
215215
{{ with .Params.author }}
216216
<div class="flex items-center text-sm text-gray-500">
217217
<i class="fas fa-user-circle mr-2"></i>
218-
<span>{{ . }}</span>
218+
<a href="{{ "/authors/" | relURL }}{{ . | urlize }}/" class="hover:text-blue-600 transition-colors duration-200">{{ . }}</a>
219219
</div>
220220
{{ end }}
221221
</div>
@@ -261,7 +261,7 @@ <h3 class="text-lg font-semibold text-gray-900 mb-2">Discord Community</h3>
261261
</div>
262262
<h3 class="text-lg font-semibold text-gray-900 mb-2">Forums</h3>
263263
<p class="text-gray-600 text-sm mb-4">Ask questions and share knowledge</p>
264-
<a href="https://forums.powershell.org" target="_blank" rel="noopener"
264+
<a href="{{ .Site.Params.social.forums }}" target="_blank" rel="noopener"
265265
class="text-green-600 font-medium hover:text-green-700">Browse Topics</a>
266266
</div>
267267

themes/powershell-community/layouts/partials/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ <h3 class="text-lg font-semibold text-white mb-4">Quick Links</h3>
4040
<li><a href="/summit/" class="text-gray-400 hover:text-white transition-colors duration-200">Summit</a></li>
4141
<li><a href="/learning/" class="text-gray-400 hover:text-white transition-colors duration-200">Learning Resources</a></li>
4242
<li><a href="/community/" class="text-gray-400 hover:text-white transition-colors duration-200">Community</a></li>
43-
<li><a href="https://forums.powershell.org" target="_blank" rel="noopener" class="text-gray-400 hover:text-white transition-colors duration-200">Forums</a></li>
43+
<li><a href="{{ .Site.Params.social.forums }}" target="_blank" rel="noopener" class="text-gray-400 hover:text-white transition-colors duration-200">Forums</a></li>
4444
</ul>
4545
</div>
4646

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)