|
| 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 }} |
0 commit comments