Merge missing translations (#10355)

* Merge missing translations

* Disable Norwegian
pull/9591/merge
Bjørn Erik Pedersen 2018-10-01 22:38:37 +03:00 committed by k8s-ci-robot
parent 4b77af7466
commit 32014f94b3
29 changed files with 2303 additions and 45 deletions

View File

@ -1,5 +1,5 @@
DOCKER = docker
HUGO_VERSION = 0.47.1
HUGO_VERSION = 0.49
DOCKER_IMAGE = kubernetes-hugo
DOCKER_RUN = $(DOCKER) run --rm --interactive --tty --volume $(PWD):/src

View File

@ -22,7 +22,7 @@ pygmentsStyle = "emacs"
# Enable Git variables like commit, lastmod
enableGitInfo = true
# This is currently used for testing.
# Norwegian ("no") is sometimes but not currently used for testing.
disableLanguages = ["no"]
[blackfriday]
@ -143,6 +143,8 @@ description = "Production-Grade Container Orchestration"
languageName ="Norsk"
weight = 3
contentDir = "content/no"
[languages.no.params]
time_format_blog = "02.01.2006"
# A list of language codes to look for untranslated content, ordered from left to right.
language_alternatives = ["en"]

View File

@ -0,0 +1,4 @@
---
title: Kubernetes Blogg
linkTitle: Blogg
---

View File

@ -0,0 +1,6 @@
---
title: '2018 Norsk oversettelse'
date: 2018-09-06
---
Norsk oversettelse.

View File

@ -1,4 +1,8 @@
---
title: Eksempler på Kubernetes-bruk
linkTitle: Kubernetes-brukere
class: gridPage
cid: caseStudies
---

View File

@ -0,0 +1,115 @@
---
title: Adform bruker-historie
linkTitle: Adform
case_study_styles: true
cid: caseStudies
css: /css/style_case_studies.css
featured: true
weight: 47
quote: Her er en norsk oversettelse.
---
<div class="banner1 desktop" style="background-image: url('/images/CaseStudy_adform_banner1.jpg')">
<h1> CASE STUDY:<img src="/images/adform_logo.png" style="width:15%;margin-bottom:0%" class="header_logo"><br> <div class="subhead">Improving Performance and Morale with Cloud Native
</div></h1>
</div>
<div class="details">
Company &nbsp;<b>AdForm</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Location &nbsp;<b>Copenhagen, Denmark</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Industry &nbsp;<b>Adtech</b>
</div>
<hr>
<section class="section1">
<div class="cols">
<div class="col1">
<h2>Challenge</h2>
<a href="https://site.adform.com/">Adforms</a> mission is to provide a secure and transparent full stack of advertising technology to enable digital ads across devices. The company has a large infrastructure: <a href="https://www.openstack.org/">OpenStack</a>-based private clouds running on 1,100 physical servers in 7 data centers around the world, 3 of which were opened in the past year. With the companys growth, the infrastructure team felt that "our private cloud was not really flexible enough," says IT System Engineer Edgaras Apšega. "The biggest pain point is that our developers need to maintain their virtual machines, so rolling out technology and new software takes time. We were really struggling with our releases, and we didnt have self-healing infrastructure."
<br>
<h2>Solution</h2>
The team, which had already been using <a href="https://prometheus.io/">Prometheus</a> for monitoring, embraced <a href="https://kubernetes.io/">Kubernetes</a> and cloud native practices in 2017. "To start our Kubernetes journey, we had to adapt all our software, so we had to choose newer frameworks," says Apšega. "We also adopted the microservices way, so observability is much better because you can inspect the bug or the services separately."
</div>
<div class="col2">
<h2>Impact</h2>
"Kubernetes helps our business a lot because our features are coming to market faster," says Apšega. The release process went from several hours to several minutes. Autoscaling has been at least 6 times faster than the semi-manual VM bootstrapping and application deployment required before. The team estimates that the company has experienced cost savings of 4-5x due to less hardware and fewer man hours needed to set up the hardware and virtual machines, metrics, and logging. Utilization of the hardware resources has been reduced as well, with containers notching 2-3 times more efficiency over virtual machines. "The deployments are very easy because developers just push the code and it automatically appears on Kubernetes," says Apšega. Prometheus has also had a positive impact: "It provides high availability for metrics and alerting. We monitor everything starting from hardware to applications. Having all the metrics in <a href="https://grafana.com/">Grafana</a> dashboards provides great insight on your systems."
</div>
</div>
</section>
<div class="banner2">
<div class="banner2text">
"Kubernetes enabled the self-healing and immutable infrastructure. We can do faster releases, so our developers are really happy. They can ship our features faster than before, and that makes our clients happier."<span style="font-size:14px;letter-spacing:0.12em;padding-top:20px;text-transform:uppercase;line-height:14px"><br><br>— Edgaras Apšega, IT Systems Engineer, Adform</span>
</div>
</div>
<section class="section2">
<div class="fullcol">
<h2>Adform made <a href="https://www.wsj.com/articles/fake-ad-operation-used-to-steal-from-publishers-is-uncovered-1511290981">headlines</a> last year when it detected the HyphBot ad fraud network that was costing some businesses hundreds of thousands of dollars a day.</h2>With its mission to provide a secure and transparent full stack of advertising technology to enable an open internet, Adform published a <a href="https://site.adform.com/media/85132/hyphbot_whitepaper_.pdf">white paper</a> revealing what it did—and others could too—to limit customers exposure to the scam. <br><br>
In that same spirit, Adform is sharing its cloud native journey. "When you see that everyone shares their best practices, it inspires you to contribute back to the project," says IT Systems Engineer Edgaras Apšega.<br><br>
The company has a large infrastructure: <a href="https://www.openstack.org/">OpenStack</a>-based private clouds running on 1,100 physical servers in their own seven data centers around the world, three of which were opened in the past year. With the companys growth, the infrastructure team felt that "our private cloud was not really flexible enough," says Apšega. "The biggest pain point is that our developers need to maintain their virtual machines, so rolling out technology and new software really takes time. We were really struggling with our releases, and we didnt have self-healing infrastructure."
</div>
</section>
<div class="banner3" style="background-image: url('/images/CaseStudy_adform_banner3.jpg')">
<div class="banner3text">
"The fact that Cloud Native Computing Foundation incubated Kubernetes was a really big point for us because it was vendor neutral. And we can see that a community really gathers around it. Everyone shares their experiences, their knowledge, and the fact that its open source, you can contribute."<span style="font-size:14px;letter-spacing:0.12em;padding-top:20px;text-transform:uppercase;line-height:14px"><br><br>— Edgaras Apšega, IT Systems Engineer, Adform</span>
</div>
</div>
<section class="section3">
<div class="fullcol">
The team, which had already been using Prometheus for monitoring, embraced Kubernetes, microservices, and cloud native practices. "The fact that Cloud Native Computing Foundation incubated Kubernetes was a really big point for us because it was vendor neutral," says Apšega. "And we can see that a community really gathers around it."<br><br>
A proof of concept project was started, with a Kubernetes cluster running on bare metal in the data center. When developers saw how quickly containers could be spun up compared to the virtual machine process, "they wanted to ship their containers in production right away, and we were still doing proof of concept," says IT Systems Engineer Andrius Cibulskis.
Of course, a lot of work still had to be done. "First of all, we had to learn Kubernetes, see all of the moving parts, how they glue together," says Apšega. "Second of all, the whole CI/CD part had to be redone, and our DevOps team had to invest more man hours to implement it. And third is that developers had to rewrite the code, and theyre still doing it."
<br><br>
The first production cluster was launched in the spring of 2018, and is now up to 20 physical machines dedicated for pods throughout three data centers, with plans for separate clusters in the other four data centers. The user-facing Adform application platform, data distribution platform, and back ends are now all running on Kubernetes. "Many APIs for critical applications are being developed for Kubernetes," says Apšega. "Teams are rewriting their applications to .NET core, because it supports containers, and preparing to move to Kubernetes. And new applications, by default, go in containers."
</div>
</section>
<div class="banner4" style="background-image: url('/images/CaseStudy_adform_banner4.jpg')">
<div class="banner4text">
"Releases are really nice for them, because they just push their code to Git and thats it. They dont have to worry about their virtual machines anymore." <span style="font-size:14px;letter-spacing:0.12em;padding-top:20px;text-transform:uppercase;line-height:14px"><br><br>— Andrius Cibulskis, IT Systems Engineer, Adform</span>
</div>
</div>
<section class="section5">
<div class="fullcol">
This big push has been driven by the real impact that these new practices have had. "Kubernetes helps our business a lot because our features are coming to market faster," says Apšega. "The deployments are very easy because developers just push the code and it automatically appears on Kubernetes." The release process went from several hours to several minutes. Autoscaling is at least six times faster than the semi-manual VM bootstrapping and application deployment required before. <br><br>
The team estimates that the company has experienced cost savings of 4-5x due to less hardware and fewer man hours needed to set up the hardware and virtual machines, metrics, and logging. Utilization of the hardware resources has been reduced as well, with containers notching two to three times more efficiency over virtual machines. <br><br>
Prometheus has also had a positive impact: "It provides high availability for metrics and alerting," says Apšega. "We monitor everything starting from hardware to applications. Having all the metrics in Grafana dashboards provides great insight on our systems."
</div>
<div class="banner5">
<div class="banner5text">
"I think that our company just started our cloud native journey. It seems like a huge road ahead, but were really happy that we joined it." <span style="font-size:14px;letter-spacing:0.12em;padding-top:20px;text-transform:uppercase;line-height:14px"><br><br>— Edgaras Apšega, IT Systems Engineer, Adform</span>
</div>
</div>
<div class="fullcol">
All of these benefits have trickled down to individual team members, whose working lives have been changed for the better. "They used to have to get up at night to re-start some services, and now Kubernetes handles all of that," says Apšega. Adds Cibulskis: "Releases are really nice for them, because they just push their code to Git and thats it. They dont have to worry about their virtual machines anymore." Even the security teams have been impacted. "Security teams are always not happy," says Apšega, "and now theyre happy because they can easily inspect the containers."
The company plans to remain in the data centers for now, "mostly because we want to keep all the data, to not share it in any way," says Cibulskis, "and its cheaper at our scale." But, Apšega says, the possibility of using a hybrid cloud for computing is intriguing: "One of the projects were interested in is the <a href="https://github.com/virtual-kubelet/virtual-kubelet">Virtual Kubelet</a> that lets you spin up the working nodes on different clouds to do some computing."
<br><br>
Apšega, Cibulskis and their colleagues are keeping tabs on how the cloud native ecosystem develops, and are excited to contribute where they can. "I think that our company just started our cloud native journey," says Apšega. "It seems like a huge road ahead, but were really happy that we joined it."
</div>
</section>

View File

@ -0,0 +1,3 @@
---
title: Dokumentasjon
---

View File

@ -0,0 +1,29 @@
---
title: "Hjelp til med Kubernetes-dokumentasjonen"
weight: 80
---
## Quamquam conversa
Tooltip: {{< glossary_tooltip text="Pod" term_id="pod" >}}. Tooltip 2 (translated): {{< glossary_tooltip term_id="container" >}}.
Capere mirabile gaudet vetitorum proturbat sponte amplexus videamus
*exsultantemque* maenala partibus radice seris [submersum at
vitta](http://flamine.org/nostrae) transcurrere nitidum lumina septem.
Recentibus superas discedens duobus fessusque Stygias ubera et terrarumque
monstri conprensus amantis Martius orbes. Ad secreta Medusae diurnis movit
aspicite, patruo, nunc referre, abit prior ab, Est! Et esse **et** flexi
periuria, venturis mihi finis nunc premis, citharae.
> Exit relinquant testataque habet varios et Mermeros longaque incidit vestes
> unda quae daulida. Temeraria fugant patriorum plures, stabat, in illam;
> vilisque labori virosque; ad, nomine, vires. Hiatu occulte vindice, bracchia
> ille sustulit adspicit data? Tibi recto flammas sine non, partes esset,
> tendens omnes.
## Ante dos Caucason stetit eadem errabat ipsa
Quid videbatur nimium sonus, in tibi, contingere viriles erit! Se vitat oculi
viginti, posse, pectus veteres. Citharae *carmina* subdidit, corruit pulcherrime
mortalia turaque nostri aequora tempora credas repugnat loqui! Parnasi seu ument
ea fulgore, teres **ut adamanta longis** dant spatium est *ille* prosilit iacto?

View File

@ -0,0 +1,19 @@
---
title: Kubernetes-dokumentasjon
layout: docsportal_home
noedit: true
cid: userJourneys
css: /css/style_user_journeys.css
display_browse_numbers: true
linkTitle: "Dokumentasjon"
main_menu: true
weight: 5
menu:
main:
title: "Dokumentasjon"
weight: 20
post: >
<p>Lær å bruke Kubernetes gjenom eksempler of referansedokumentasjon. Du kan også <a href="/editdocs/" data-auto-burger-exclude>hjelpe</a>!</p>
---

View File

@ -0,0 +1,14 @@
---
title: Referanse
weight: 70
main_menu: true
---
## Referanse 1
## Referanse 2
## Referanse 3
## Referanse 4

View File

@ -0,0 +1,19 @@
---
title: "Kontainer"
id: container
date: 2018-04-12
full_link: /docs/concepts/overview/what-is-kubernetes/#why-containers
short_description: >
En lett-vekts kontainer med alle avhengigheter.
aka:
tags:
- fundamental
- workload
---
En lett-vekts kontainer med alle avhengigheter.
<!--more-->
Mer tekst her.

View File

@ -0,0 +1,4 @@
---
title: "Ordliste"
layout: glossary
---

View File

@ -0,0 +1,8 @@
---
no_issue: true
weight: 30
title: Oppsett
main_menu: true
---
Dette er en midlertidig norsk oversettelse.

View File

@ -0,0 +1,6 @@
---
title: Å velge den rette løsningen
weight: 10
---
Dette er en midlertidig norsk oversettelse.

View File

@ -0,0 +1,5 @@
---
title: Grunnleggende Kubernetes
linkTitle: Prøv Kubernetes
weight: 10
---

View File

@ -45,6 +45,21 @@ other = """The Kubernetes Authors | Documentation Distributed under <a href="htt
[main_copyright_notice]
other = """The Linux Foundation &reg;. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our <a href="https://www.linuxfoundation.org/trademark-usage" class="light-text">Trademark Usage page</a>"""
# Labels for the docs portal home page.
[docs_label_browse]
other = "Browse Docs"
[docs_label_contributors]
other = "Contributors"
[docs_label_users]
other = "Users"
[docs_label_i_am]
other = "I AM..."
# Community links
[community_twitter_name]
other = "Twitter"

View File

@ -45,6 +45,10 @@ other = """Kubernetes-forfatterene | Dokumentasjonen er utgitt med <a href="http
[main_copyright_notice]
other = """The Linux Foundation &reg;. Alle retter er reservert. The Linux Foundation har registrerte varemerker. For en oversikt, se <a href="https://www.linuxfoundation.org/trademark-usage" class="light-text">Bruk av varemerker</a>"""
# Labels for the docs portal home page.
[docs_label_browse]
other = "All dokumentasjon"
# Community links
[community_twitter_name]
other = "Twitter"

View File

@ -1,5 +1,14 @@
{{ define "main" }}
{{ range (.Paginator 1).Pages }}
{{ $pages := ($.Paginator 1).Pages }}
{{ with $.Site.Params.language_alternatives }}
{{ range . }}
{{ with (where $.Translations ".Lang" . ) }}
{{ $p := index . 0 }}
{{ $pages = $pages | lang.Merge ($p.Paginator 1).Pages }}
{{ end }}
{{ end }}
{{ end }}
{{ range $pages }}
{{ .Render "post" }}
{{ end }}
<div class="PageNavigation">

View File

@ -1,11 +1,20 @@
{{ define "main" }}
{{ $featured := where .Pages "Params.featured" true }}
{{ $pages := .Pages }}
{{ with $.Site.Params.language_alternatives }}
{{ range . }}
{{ with (where $.Translations ".Lang" . ) }}
{{ $p := index . 0 }}
{{ $pages = $pages | lang.Merge $p.Pages }}
{{ end }}
{{ end }}
{{ end }}
{{ $featured := (where $pages "Params.featured" true).ByWeight | first 4 }}
<section id="mainContent">
<main>
<div class="content">
<div class="case-studies">
{{ range $featured }}
{{ template "case-study-featured-block" . }}
{{ template "case-study-featured-block" (dict "ctx" $ "page" .) }}
{{ end }}
</div>
</div>
@ -33,9 +42,9 @@
{{ end }}
<section id="users">
<main>
<h3>Kubernetes Users</h3>
<h3>{{ .Title }}</h3>
<div id="usersGrid">
{{ range .Pages.ByTitle }}
{{ range $pages.ByTitle }}
{{ $logo := .Resources.GetMatch "**logo*.png" }}
{{ $p := . }}
<a target="_blank" href="{{ with $p.Params.content_url }}{{ . | safeURL }}{{ else }}{{ .RelPermalink }}{{ end }}">{{ with $logo }}<img src="{{ .RelPermalink }}" alt="{{ $p.LinkTitle }}">{{ else }}
@ -49,10 +58,11 @@
{{ .Content }}
{{ end }}
{{ define "case-study-featured-block" }}
{{ $logo := .Resources.GetMatch "**{feature,logo}*.png" }}
{{ $isForeignLanguage := (ne .page.Lang .ctx.Lang)}}
{{ $logo := .page.Resources.GetMatch "**{feature,logo}*.png" }}
<div class="case-study">
{{ with $logo }}<img src="{{ .RelPermalink }}" alt="{{ .Title }}">{{ end }}
<p class="quote">"{{ .Params.quote | html }}"</p>
<a href="{{ .RelPermalink }}">Read about {{ .LinkTitle }}</a>
<p class="quote">"{{ .page.Params.quote | html }}"</p>
<a href="{{ .RelPermalink }}"{{ if $isForeignLanguage }} target="_blank"{{ end }}>{{ T "main_read_about"}} {{ .page.LinkTitle }}</a>
</div>
{{ end }}

View File

@ -2,8 +2,10 @@
{{ if not .Params.notitle }}
<h1>{{ .Title }}</h1>
{{ end }}
{{ if eq .Lang "en" }}
{{ template "docs-portal-user-journey" . }}
{{ partial "docs/browse.html" (where .Parent.Sections ".Params.toc_hide" "!=" true) }}
{{ end }}
{{ partial "docs/browse.html" .Parent }}
{{ end }}
{{ define "content-id" }}content{{ end }}
@ -54,13 +56,13 @@
</div>
<div class="paths">
<div class="navButton users">Users</div>
<div class="navButton contributors">Contributors</div>
<a> <div class="navButton browse">Browse Docs</div></a>
<div class="navButton users">{{ T "docs_label_users" }}</div>
<div class="navButton contributors">{{ T "docs_label_contributors" }}</div>
<a> <div class="navButton browse">{{ T "docs_label_browse" }}</div></a>
</div>
<div id="cardWrapper">
<div class="display-bar">I AM...</div>
<div class="display-bar">{{ T "docs_label_i_am" }}</div>
<div class='cards' markdown="1">
<div class='docsection1' id='persona-definition'>.</div>
</div>

View File

@ -26,8 +26,10 @@
<span class="tag-option"><a id="deselect-all-tags" href="javascript:void(0)">Deselect all</a></span>
</div>
<p>Click on the <a href="javascript:void(0)" class="no-underline">[+]</a> indicators below to get a longer explanation for any particular term.</p>
{{ $glossary_terms := (.Site.GetPage "page" "docs/reference/glossary").Resources.ByType "page" }}
{{ $glossary_terms := sort $glossary_terms "Title" "asc" }}
{{ partial "docs/glossary-terms.html" . }}
{{ $glossary_items := $.Scratch.Get "glossary_items" }}
{{ with $glossary_items }}
{{ $glossary_terms := sort . "Title" "asc" }}
<ul>
{{ range $glossary_terms }}
{{ $.Scratch.Set "tag_classes" "" }}
@ -53,4 +55,5 @@
{{ end }}
</ul>
{{ end }}
{{ end }}

View File

@ -1,5 +1,14 @@
{{ $pages := .CurrentSection.Pages }}
{{ with $.Site.Params.language_alternatives }}
{{ range . }}
{{ with (where $.CurrentSection.Translations ".Lang" . ) }}
{{ $p := index . 0 }}
{{ $pages = $pages | lang.Merge $p.Pages }}
{{ end }}
{{ end }}
{{ end }}
<div class="panel-group" id="blog-archive">
{{ range $i, $e := .CurrentSection.Pages.GroupByPublishDate "2006" }}
{{ range $i, $e := $pages.GroupByPublishDate "2006" }}
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
@ -11,7 +20,8 @@
<div class="panel-body">
<ul class="list-group">
{{ range .Pages }}
<li class="list-group-item"><a href="{{ .Permalink }}">{{ .LinkTitle }}</a> <span class="date">{{ .PublishDate.Format "Jan 2" }}</span> </li>
{{ $isForeignLanguage := (ne .Lang $.Lang)}}
<li class="list-group-item"><a href="{{ .Permalink }}"{{ if $isForeignLanguage }} target="_blank" {{ end }}>{{ .LinkTitle }}</a> <span class="date">{{ .PublishDate.Format "Jan 2" }}</span>{{ if $isForeignLanguage }} <small>({{ .Lang | upper }})</small>{{ end }}</li>
{{ end }}
</ul>
</div>

View File

@ -1,22 +1,31 @@
<div id='browsedocsWrapper'>
<div class="browseheader" id="browsedocs">
<a name="browsedocs">Browse Docs</a>
<a name="browsedocs">{{ T "docs_label_browse" }}</a>
</div>
<div class="browsedocs">
{{ range . }}
{{ template "docs-browse-section" . }}
{{ end }}
{{ template "docs-browse-section" (dict "ctx" . "page" .) }}
</div><!-- end browsedocs -->
{{ define "docs-browse-section" }}
{{ $pages := .page.Pages }}
{{ $sections := .page.Sections }}
{{ with $.ctx.Site.Params.language_alternatives }}
{{ range . }}
{{ with (where $.page.Translations ".Lang" . ) }}
{{ $p := index . 0 }}
{{ $pages = $pages | lang.Merge $p.Pages }}
{{ $sections = $sections | lang.Merge $p.Sections }}
{{ end }}
{{ end }}
{{ end }}
{{ $pages := where $pages ".Params.toc_hide" "!=" true }}
{{ $sections := where $sections ".Params.toc_hide" "!=" true }}
{{ if not .page.Parent.IsHome }}
<div class="browsesection">
<div class="docstitle">
<h3><a href="{{ .RelPermalink }}">{{ .Params.bigheader | default .Title }}</a></h3>
<h3><a href="{{ .page.RelPermalink }}">{{ .page.Params.bigheader | default .page.Title }}</a></h3>
</div>
{{ $pages := .Pages | union .Sections }}
{{ $pages := where $pages ".Params.toc_hide" "!=" true }}
{{ if ge (len $pages) 1 }}
<div class="pages">
{{ $num_pages := len $pages }}
@ -27,7 +36,8 @@
{{ if eq $offset 1 }}
<div class="browsecolumn">
{{ end }}
<a href="{{ .RelPermalink }}">{{ printf "%02d - %s" (add $i 1) .LinkTitle }}</a><br>
{{ $isForeignLanguage := (ne .Lang $.ctx.Lang)}}
<a href="{{ .RelPermalink }}"{{ if $isForeignLanguage }} target="_blank" {{ end }}>{{ printf "%02d - %s" (add $i 1) .LinkTitle }}{{ if $isForeignLanguage }} <small>({{ .Lang | upper }})</small>{{ end }}</a><br>
{{ if or (eq $offset $column_size) (eq (add $i 1) $num_pages)}}
</div>
{{ end }}
@ -37,3 +47,7 @@
{{ end }}
</div><!-- end browsesection -->
{{ end }}
{{ range $sections.ByWeight }}
{{ template "docs-browse-section" (dict "ctx" $.ctx "page" .) }}
{{ end }}
{{ end }}

View File

@ -0,0 +1,13 @@
{{ $glossaryBundle := .Site.GetPage "page" "docs/reference/glossary" }}
{{- if $glossaryBundle -}}
{{ $pages := $glossaryBundle.Resources.ByType "page" }}
{{- range $.Site.Params.language_alternatives -}}
{{- with (where $glossaryBundle.Translations ".Lang" . ) -}}
{{ $p := (index . 0) }}
{{ $pages = $pages | lang.Merge ($p.Resources.ByType "page") }}
{{ end }}
{{ end }}
{{- $.Scratch.Set "glossary_items" $pages -}}
{{- else -}}
{{- errorf "[%s] Glossary Bundle not found for language. Create at least an index.md file inside docs/reference/glossary" .Page.Site.Language.Lang -}}
{{- end -}}

View File

@ -1,27 +1,37 @@
<a class="item" data-title="{{ .LinkTitle }}" href="{{ .RelPermalink }}"></a>
{{ template "section-tree-nav" . }}
{{ template "section-tree-nav" (dict "ctx" . "section" .) }}
{{ define "section-tree-nav" }}
{{ $sections := where (union .Pages .Sections).ByWeight ".Params.toc_hide" "!=" true }}
{{ $pages := (union .section.Pages .section.Sections) }}
{{ with $.ctx.Site.Params.language_alternatives }}
{{ range . }}
{{ with (where $.section.Translations ".Lang" . ) }}
{{ $p := index . 0 }}
{{ $pages = $pages | lang.Merge (union $p.Pages $p.Sections) }}
{{ end }}
{{ end }}
{{ end }}
{{ $sections := where $pages.ByWeight ".Params.toc_hide" "!=" true }}
{{ range $sections }}
{{ if .IsPage }}
{{ template "section-tree-nav-page" . }}
{{ template "section-tree-nav-page" (dict "ctx" $.ctx "page" .) }}
{{ else }}
{{ template "section-tree-nav-section" . }}
{{ template "section-tree-nav-section" (dict "ctx" $.ctx "section" .) }}
{{ end }}
{{ end }}
{{ end }}
{{ define "section-tree-nav-section" }}
<div class="item" data-title="{{ .LinkTitle }}">
<div class="container">
{{ if ge (len .Content) 10 }}
<div class="item" data-title="{{ .section.LinkTitle }}">
<div class="container">
{{ if ge (len .section.Content) 10 }}
{{/* The section page has content, so link to it. */}}
<a class="item" data-title="{{ .LinkTitle }}" href="{{ .RelPermalink }}"></a>
{{ $isForeignLanguage := (ne .section.Lang $.ctx.Lang)}}
<a class="item" {{ if $isForeignLanguage }}target="_blank" {{ end }}data-title="{{ .section.LinkTitle }}{{ if $isForeignLanguage }} <small>({{ .section.Lang | upper }})</small>{{ end }}" href="{{ .section.RelPermalink }}"></a>
{{ end }}
{{ template "section-tree-nav" . }}
</div>
</div>
</div>
{{ end }}
{{ define "section-tree-nav-page" }}
<a class="item" data-title="{{ .LinkTitle }}" href="{{ .RelPermalink }}"></a>
{{ end }}
{{ $isForeignLanguage := (ne .page.Lang $.ctx.Lang)}}
<a class="item" {{ if $isForeignLanguage }}target="_blank" {{ end }}data-title="{{ .page.LinkTitle }}{{ if $isForeignLanguage }} <small>({{ .page.Lang | upper }})</small>{{ end }}" href="{{ .page.RelPermalink }}"></a>
{{ end }}

View File

@ -1,8 +1,11 @@
{{- $id := .Get "term_id" -}}
{{- $text := .Get "text" -}}
{{- $glossaryBundle := .Site.GetPage "page" "docs/reference/glossary" -}}
{{- $glossaryItems := $glossaryBundle.Resources.ByType "page" -}}
{{- $term_info := $glossaryItems.GetMatch (printf "%s*" $id ) -}}
{{- partial "docs/glossary-terms.html" $.Page -}}
{{- $glossary_items := $.Page.Scratch.Get "glossary_items" -}}
{{- if not $glossary_items -}}
{{- errorf "[%s] No glossary items found" .Page.Site.Language.Lang -}}
{{- else -}}
{{- $term_info := $glossary_items.GetMatch (printf "%s*" $id ) -}}
{{- if not $term_info -}}
{{- errorf "[%s] %q: %q is not a valid glossary term_id, see ./docs/reference/glossary/* for a full list" .Page.Site.Language.Lang .Page.Path $id -}}
{{- end }}
@ -19,4 +22,5 @@
{{- $tooltip | safeHTML -}}
</span>
</a>
{{- end -}}
{{- end -}}
{{- end -}}

View File

@ -6,7 +6,7 @@ publish = "public"
command = "make non-production-build"
[build.environment]
HUGO_VERSION = "0.47.1"
HUGO_VERSION = "0.49"
[context.production.environment]
HUGO_BASEURL = "https://kubernetes.io/"

View File

@ -0,0 +1 @@
{"Target":"css/styles.css","MediaType":"text/css","Data":{}}