Skip to content

Commit 9d392a0

Browse files
committed
feat(community): implement dynamic community groups with Hugo content adapters and SEO improvements
1 parent 794a7f4 commit 9d392a0

File tree

15 files changed

+703
-8
lines changed

15 files changed

+703
-8
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ _tmp/
4242

4343
# Added yarn dependecies
4444
node_modules/
45+
46+
# Ingested documents
47+
data/sigs.yaml

content/en/blog/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "Contributor Blog"
33
linkTitle: "Blog"
4+
description: "Stay up to date with the latest news, stories, and updates from the Kubernetes contributor community."
45
menu:
56
main:
67
weight: 20

content/en/community/.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
code-of-conduct-incident-process.md
2-
community-groups.md
32
community-meeting.md
43
mentoring.md
54
values.md
5+
sigs.yaml
6+
community-groups/**
7+
!community-groups/_index.md
8+
!community-groups/_content.gotmpl
9+
!community-groups/sigs/
10+
!community-groups/sigs/_index.md
11+
!community-groups/wg/
12+
!community-groups/wg/_index.md
13+
!community-groups/committees/
14+
!community-groups/committees/_index.md
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
{{/* content/en/community/community-groups/_content.gotmpl */}}
2+
3+
{{ $sigsUrl := "https://raw.githubusercontent.com/kubernetes/community/master/sigs.yaml" }}
4+
{{ $baseUrl := "https://raw.githubusercontent.com/kubernetes/community/master/" }}
5+
6+
{{ with resources.GetRemote $sigsUrl | transform.Unmarshal }}
7+
8+
{{/* SIGs */}}
9+
{{ range .sigs }}
10+
{{ $name := .name }}
11+
{{ $dir := .dir }}
12+
{{ $slug := replace $dir "sig-" "" }}
13+
14+
{{/* Main Index Page */}}
15+
{{ $readmeUrl := printf "%s%s/README.md" $baseUrl $dir }}
16+
{{ $content := "" }}
17+
{{ with resources.GetRemote $readmeUrl }}
18+
{{ if .Err }}
19+
{{ warnf "Unable to load README for %s: %s" $dir .Err }}
20+
{{ else }}
21+
{{ $content = replace .Content "\u200b" "" }}
22+
{{ end }}
23+
{{ end }}
24+
25+
{{ $page := dict
26+
"kind" "section"
27+
"path" (printf "sigs/%s" $slug)
28+
"title" (printf "SIG %s" $name)
29+
"params" (dict
30+
"description" .mission_statement
31+
"leadership" .leadership
32+
"meetings" .meetings
33+
"contact" .contact
34+
"subprojects" .subprojects
35+
"label" .label
36+
"dir" .dir
37+
)
38+
"content" (dict
39+
"mediaType" "text/markdown"
40+
"value" $content
41+
)
42+
}}
43+
{{ $.AddPage $page }}
44+
45+
{{/* Charter Page */}}
46+
{{ $charterUrl := printf "%s%s/charter.md" $baseUrl $dir }}
47+
{{ with resources.GetRemote $charterUrl }}
48+
{{ if not .Err }}
49+
{{ $charterContent := replace .Content "\u200b" "" }}
50+
{{ $charterPage := dict
51+
"kind" "page"
52+
"path" (printf "sigs/%s/charter" $slug)
53+
"title" (printf "SIG %s Charter" $name)
54+
"content" (dict
55+
"mediaType" "text/markdown"
56+
"value" $charterContent
57+
)
58+
}}
59+
{{ $.AddPage $charterPage }}
60+
{{ end }}
61+
{{ end }}
62+
{{ end }}
63+
64+
{{/* Working Groups */}}
65+
{{ range .workinggroups }}
66+
{{ $name := .name }}
67+
{{ $dir := .dir }}
68+
{{ $slug := replace $dir "wg-" "" }}
69+
70+
{{/* Main Index Page */}}
71+
{{ $readmeUrl := printf "%s%s/README.md" $baseUrl $dir }}
72+
{{ $content := "" }}
73+
{{ with resources.GetRemote $readmeUrl }}
74+
{{ if not .Err }}
75+
{{ $content = replace .Content "\u200b" "" }}
76+
{{ end }}
77+
{{ end }}
78+
79+
{{ $page := dict
80+
"kind" "section"
81+
"path" (printf "wg/%s" $slug)
82+
"title" (printf "WG %s" $name)
83+
"params" (dict
84+
"description" .mission_statement
85+
"leadership" .leadership
86+
"meetings" .meetings
87+
"contact" .contact
88+
"dir" .dir
89+
)
90+
"content" (dict
91+
"mediaType" "text/markdown"
92+
"value" $content
93+
)
94+
}}
95+
{{ $.AddPage $page }}
96+
97+
{{/* Charter Page */}}
98+
{{ $charterUrl := printf "%s%s/charter.md" $baseUrl $dir }}
99+
{{ with resources.GetRemote $charterUrl }}
100+
{{ if not .Err }}
101+
{{ $charterContent := replace .Content "\u200b" "" }}
102+
{{ $charterPage := dict
103+
"kind" "page"
104+
"path" (printf "wg/%s/charter" $slug)
105+
"title" (printf "WG %s Charter" $name)
106+
"content" (dict
107+
"mediaType" "text/markdown"
108+
"value" $charterContent
109+
)
110+
}}
111+
{{ $.AddPage $charterPage }}
112+
{{ end }}
113+
{{ end }}
114+
{{ end }}
115+
116+
{{/* Committees */}}
117+
{{ range .committees }}
118+
{{ $name := .name }}
119+
{{ $dir := .dir }}
120+
{{ $slug := replace $dir "committee-" "" }}
121+
122+
{{/* Main Index Page */}}
123+
{{ $readmeUrl := printf "%s%s/README.md" $baseUrl $dir }}
124+
{{ $content := "" }}
125+
{{ with resources.GetRemote $readmeUrl }}
126+
{{ if not .Err }}
127+
{{ $content = replace .Content "\u200b" "" }}
128+
{{ end }}
129+
{{ end }}
130+
131+
{{ $page := dict
132+
"kind" "section"
133+
"path" (printf "committees/%s" $slug)
134+
"title" (printf "%s" $name)
135+
"params" (dict
136+
"description" .mission_statement
137+
"leadership" .leadership
138+
"meetings" .meetings
139+
"contact" .contact
140+
"dir" .dir
141+
)
142+
"content" (dict
143+
"mediaType" "text/markdown"
144+
"value" $content
145+
)
146+
}}
147+
{{ $.AddPage $page }}
148+
149+
{{/* Charter Page */}}
150+
{{ $charterUrl := printf "%s%s/charter.md" $baseUrl $dir }}
151+
{{ with resources.GetRemote $charterUrl }}
152+
{{ if not .Err }}
153+
{{ $charterContent := replace .Content "\u200b" "" }}
154+
{{ $charterPage := dict
155+
"kind" "page"
156+
"path" (printf "committees/%s/charter" $slug)
157+
"title" (printf "%s Charter" $name)
158+
"content" (dict
159+
"mediaType" "text/markdown"
160+
"value" $charterContent
161+
)
162+
}}
163+
{{ $.AddPage $charterPage }}
164+
{{ end }}
165+
{{ end }}
166+
{{ end }}
167+
168+
{{ end }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: Community Groups
3+
linkTitle: Community Groups
4+
description: |
5+
A list of our community groups: Special Interest Groups, Working Groups and Committees.
6+
weight: 99
7+
type: docs
8+
aliases: [ "/groups", "/sigs" ]
9+
slug: community-groups
10+
hide_section_index: true
11+
---
12+
13+
Most community activity is organized into Special Interest Groups (SIGs) and time bounded Working Groups.
14+
15+
SIGs follow these [guidelines](https://github.com/kubernetes/community/blob/master/governance.md) although each of these groups may operate a little differently depending on their needs and workflow.
16+
17+
Each group's material is in its subdirectory in this project.
18+
19+
When the need arises, a [new SIG can be created](https://github.com/kubernetes/community/blob/master/sig-wg-lifecycle.md)
20+
21+
{{< sigs-list >}}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Committees
3+
description: "Committees are groups with specific delegated authority for the project."
4+
weight: 30
5+
hide_section_index: true
6+
---
7+
8+
{{< sigs-list show_only="committees" >}}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Special Interest Groups (SIGs)
3+
linkTitle: SIGs
4+
description: |
5+
A list of our Special Interest Groups (SIGs).
6+
weight: 1
7+
type: docs
8+
aliases: [ "/sigs" ]
9+
hide_section_index: true
10+
---
11+
12+
Most community activity is organized into Special Interest Groups (SIGs).
13+
14+
SIGs follow these [guidelines](https://github.com/kubernetes/community/blob/master/governance.md) although each of these groups may operate a little differently depending on their needs and workflow.
15+
16+
{{< sigs-list show_only="sigs" >}}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Working Groups
3+
description: "Working Groups (WBs) are temporary groups created to achieve a specific goal spanning multiple SIGs."
4+
weight: 20
5+
hide_section_index: true
6+
---
7+
8+
{{< sigs-list show_only="wg" >}}

external-sources/kubernetes/community

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"/contributors/guide/git_workflow.png","/docs/guide/git_workflow.png"
1616
"/contributors/guide/contributor-cheatsheet/README.md","/docs/contributor-cheatsheet.md"
1717
"/contributors/guide/platforms.md","/docs/guide/platforms.md"
18-
"/sig-list.md","/community/community-groups.md"
1918
"/mentoring/README.md","/community/mentoring.md"
2019
"/values.md","/community/values.md"
2120
"/communication/best-practices.md","/docs/comms/notifications.md"

hack/gen-content.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fi
5050
# discover GNU grep on the system (macOS by default has BSD grep,
5151
# which does not support perl regex via the -P flag)
5252
GREP="grep"
53-
if $GREP --version | $GREP "BSD" >/dev/null; then
53+
if $GREP --version 2>/dev/null | $GREP "BSD" >/dev/null; then
5454
if command -v ggrep >/dev/null; then
5555
GREP="ggrep"
5656
else
@@ -61,7 +61,7 @@ fi
6161

6262
# discover GNU sed on the system
6363
SED="sed"
64-
if ! $SED --version >/dev/null; then
64+
if ! $SED --version 2>/dev/null >/dev/null; then
6565
if command -v gsed >/dev/null; then
6666
SED="gsed"
6767
else

0 commit comments

Comments
 (0)