Skip to content

Commit

Permalink
Some fixes (cncf#1181)
Browse files Browse the repository at this point in the history
* these whitespace changes were needed for me to get hugo to build locally

Signed-off-by: cjyabraham <[email protected]>

* Only list terms in the sitemap that are "Completed"

Signed-off-by: cjyabraham <[email protected]>

* find better way of eliminating drafts from sitemap

Signed-off-by: cjyabraham <[email protected]>

* update logo

Signed-off-by: cjyabraham <[email protected]>

* Revert "find better way of eliminating drafts from sitemap"

This reverts commit 520e670.

* add top pages to sitemap without including them in sidebar

Signed-off-by: cjyabraham <[email protected]>

Signed-off-by: cjyabraham <[email protected]>
  • Loading branch information
cjyabraham authored Aug 16, 2022
1 parent edda257 commit e8cb8ee
Show file tree
Hide file tree
Showing 29 changed files with 61 additions and 15 deletions.
2 changes: 1 addition & 1 deletion assets/icons/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions content/bn/contribute/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: কিভাবে অবদান রাখতে হবে
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/bn/contributor-ladder/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: অবদানকারীর পথসিঁড়ি
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/bn/style-guide/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: শৈলী গাইড
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/en/contribute/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: How To Contribute
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/en/contributor-ladder/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Contributor Ladder
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/en/style-guide/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Style Guide
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/es/contribute/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Como contribuir
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/es/contributor-ladder/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Carrera de Contribuidor
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/es/style-guide/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Guía de estilos
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/hi/contribute/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: योगदान कैसे करें
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/hi/contributor-ladder/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: योगदानकर्ता सीढ़ी
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/hi/style-guide/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: शैली मार्गदर्शिका
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/it/contribute/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Come Contribuire
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/it/style-guide/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Guida di Stile
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/ko/contribute/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: 기여 방법
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/ko/contributor-ladder/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: 기여자 계층
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/ko/style-guide/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: 스타일 가이드
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/pt-br/contribute/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Como Contribuir
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/pt-br/contributor-ladder/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Escala de Contribuição
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/pt-br/style-guide/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Guia de Estilo
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/zh-cn/contribute/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: 如何参与贡献
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/zh-cn/contributor-ladder/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: 贡献者阶梯
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
1 change: 1 addition & 0 deletions content/zh-cn/style-guide/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: 风格指南
toc_hide: true
status: Completed
menu:
main:
weight: 10
Expand Down
24 changes: 24 additions & 0 deletions layouts/_default/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range ( where .Data.Pages ".Params.status" "Completed" ) | union ( where .Data.Pages ".Params.status" "completed" ) }}
{{- if .Permalink -}}
<url>
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
<xhtml:link
rel="alternate"
hreflang="{{ .Language.Lang }}"
href="{{ .Permalink }}"
/>{{ end }}
<xhtml:link
rel="alternate"
hreflang="{{ .Language.Lang }}"
href="{{ .Permalink }}"
/>{{ end }}
</url>
{{- end -}}
{{ end }}
</urlset>
4 changes: 2 additions & 2 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@
Documentation Distributed under CC BY 4.0</small>
{{ if not .Site.Params.ui.footer_about_disable }}
{{ with .Site.GetPage "about" }}
<p class="mt-2"><a href="{{ .RelPermalink }}">{{ .Title }}</a></p>{{
end }}
<p class="mt-2"><a href="{{ .RelPermalink }}">{{ .Title }}</a></p>
{{ end }}
{{ end }}
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/navbar-lang-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="dropdown-menu dropdown-menu-right"
aria-labelledby="navbarDropdownMenuLink">
{{ range $langPage.Translations }}
<a class="dropdown-item" href="{{ .RelPermalink }}">{{
.Language.LanguageName }}</a>
<a class="dropdown-item" href="{{ .RelPermalink }}">
{{ .Language.LanguageName }}</a>
{{ end }}
</div>
17 changes: 8 additions & 9 deletions layouts/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
<nav
class="js-navbar-scroll navbar navbar-expand navbar-dark {{ if $cover}} td-navbar-cover {{ end }}flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="{{ .Site.Home.RelPermalink }}">
<span class="navbar-logo">{{ if .Site.Params.ui.navbar_logo }}{{ with
resources.Get "icons/logo.svg" }}{{ ( . | minify).Content | safeHTML
}}{{ end }}{{ end }}</span>
<span class="navbar-logo">{{ if .Site.Params.ui.navbar_logo }}
{{ with resources.Get "icons/logo.svg" }}
{{ ( . | minify).Content | safeHTML }}{{ end }}{{ end }}</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-0 mt-lg-0">
{{ $p := . }}
{{ range .Site.Menus.main }}
<li class="nav-item mr-3 ml-3 mb-0 mb-lg-0">
{{ $active := or ($p.IsMenuCurrent "main" .) ($p.HasMenuCurrent
"main" .) }}
{{ $active := or ($p.IsMenuCurrent "main" .) ($p.HasMenuCurrent "main" .) }}
{{ with .Page }}
{{ $active = or $active ( $.IsDescendant .) }}
{{ end }}
Expand All @@ -22,10 +21,10 @@
{{ $baseurl := urls.Parse $.Site.Params.Baseurl }}
<a class="nav-link{{if $active }} active{{end}}"
href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}"
{{ if ne $url.Host $baseurl.Host }}target="_blank" {{ end
}}>{{ with .Pre}}{{ $pre }}{{ end }}<span{{if $active }}
class="active" {{end}}>{{ .Name }}</span>{{ with
.Post}}{{ $post }}{{ end }}</a>
{{ if ne $url.Host $baseurl.Host }}target="_blank" {{ end }}>
{{ with .Pre}}{{ $pre }}{{ end }}<span{{if $active }}
class="active" {{end}}>{{ .Name }}</span>
{{ with .Post}}{{ $post }}{{ end }}</a>
</li>
{{ end }}
{{ if .Site.Params.versions }}
Expand Down
Loading

0 comments on commit e8cb8ee

Please sign in to comment.