Skip to content

Commit b33b104

Browse files
HeyItsGilbertclaude
andcommitted
feat(community): list sub-pages on the /community section page
The /community stub rendered empty because the default list layout ranges over child content pages, of which the section has none — its sub-pages only existed in the nav dropdown menu. Add a community-specific list layout that renders the `community` menu entries as a card grid, and enrich those menu entries with icon and description params so the cards are self-documenting. New sub-pages now only need a menu entry to appear in both the nav and the page body. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent e590650 commit b33b104

2 files changed

Lines changed: 60 additions & 0 deletions

File tree

hugo.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,34 @@ menu:
5555
- name: "Learning"
5656
url: "/learning/"
5757
weight: 10
58+
params:
59+
icon: "fas fa-graduation-cap"
60+
description: "Guides, tutorials, and resources to grow your PowerShell skills."
5861
- name: "Calendar"
5962
url: "/calendar/"
6063
weight: 20
64+
params:
65+
icon: "fas fa-calendar-days"
66+
description: "Upcoming user group meetings, webinars, and community events."
6167
- name: "Authors"
6268
url: "/authors/"
6369
weight: 30
70+
params:
71+
icon: "fas fa-pen-nib"
72+
description: "Meet the community members writing articles and sharing knowledge."
6473
- name: "Forums"
6574
url: "https://forums.powershell.org"
6675
weight: 40
76+
params:
77+
icon: "fas fa-comments"
78+
description: "Ask questions and discuss PowerShell with the wider community."
79+
external: true
6780
- name: "Discord Archive"
6881
url: "/discord/"
6982
weight: 50
83+
params:
84+
icon: "fab fa-discord"
85+
description: "Searchable archive of conversations from our Discord server."
7086

7187
# Site parameters
7288
params:
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{{ define "main" }}
2+
3+
<!-- Page Header -->
4+
<section class="powershell-blue py-10">
5+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center text-white">
6+
<h1 class="text-4xl lg:text-5xl font-bold mb-2">{{ .Title }}</h1>
7+
{{ if .Params.description }}
8+
<p class="text-xl opacity-90 max-w-3xl mx-auto">{{ .Params.description }}</p>
9+
{{ end }}
10+
</div>
11+
</section>
12+
13+
<!-- Content Section -->
14+
<section class="py-10 bg-gray-50">
15+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
16+
{{ with .Content }}
17+
<div class="prose prose-lg max-w-3xl mx-auto text-center mb-10">{{ . }}</div>
18+
{{ end }}
19+
20+
<!-- Sub-page Grid -->
21+
<div class="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
22+
{{ range .Site.Menus.community }}
23+
<a href="{{ .URL }}"
24+
{{ if .Params.external }}target="_blank" rel="noopener"{{ end }}
25+
class="group block bg-white rounded-xl shadow-md hover:shadow-lg transition-shadow duration-300 p-6">
26+
<div class="flex items-center mb-3">
27+
<div class="flex items-center justify-center w-12 h-12 rounded-lg bg-blue-100 text-blue-600 mr-4">
28+
<i class="{{ with .Params.icon }}{{ . }}{{ else }}fas fa-link{{ end }} text-xl"></i>
29+
</div>
30+
<h2 class="text-xl font-bold text-gray-900 group-hover:text-blue-600 transition-colors duration-200">
31+
{{ .Name }}
32+
{{ if .Params.external }}<i class="fas fa-arrow-up-right-from-square text-xs text-gray-400 ml-1"></i>{{ end }}
33+
</h2>
34+
</div>
35+
{{ with .Params.description }}
36+
<p class="text-gray-600">{{ . }}</p>
37+
{{ end }}
38+
</a>
39+
{{ end }}
40+
</div>
41+
</div>
42+
</section>
43+
44+
{{ end }}

0 commit comments

Comments
 (0)