Revise the Kubernetes website to use Docsy (#20874)
* Add Docsy, required packages and config * Apply Docsy integration work to k8s website This encompasses significant changes to the style system, layout files, as well as changes to some of the static assets. To examine this work and the iterations that were performed, the original repository can be found at https://github.com/gearbox-built/kubernetes-hugo.git * Address issues found in review The styling and positioning of the header, footer, some shortcodes and main container elements are improved. A new partial is added for favicons. The sidebars, as well as inner table of contents, have been altered for better positioning and rendering of content. Localization has also been addressed. * Enable announcements The recent Black Lives Matter announcement surfaced issues which have been addressed.
This commit is contained in:
@@ -9,8 +9,42 @@
|
||||
|
||||
gtag('config', 'UA-36037335-10');
|
||||
</script>
|
||||
|
||||
<!-- Docsy head.html begins here -->
|
||||
|
||||
<meta charset="utf-8">
|
||||
<title>{{ if .Title }}{{ .Title }} - {{ end }}{{ site.Title }}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
{{ hugo.Generator }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" }}
|
||||
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
|
||||
{{ else }}
|
||||
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
|
||||
{{ end }}
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
|
||||
{{ end -}}
|
||||
{{ partialCached "favicons.html" . }}
|
||||
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
{{- template "_internal/opengraph.html" . -}}
|
||||
{{- template "_internal/google_news.html" . -}}
|
||||
{{- template "_internal/schema.html" . -}}
|
||||
{{- template "_internal/twitter_cards.html" . -}}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" }}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
{{ end }}
|
||||
{{ partialCached "head-css.html" . "asdf" }}
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.3.1.min.js"
|
||||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
||||
crossorigin="anonymous"></script>
|
||||
{{ if and (.Site.Params.offlineSearch) (not .Site.Params.gcs_engine_id) }}
|
||||
<script src="https://unpkg.com/lunr@2.1.6/lunr.js"></script>
|
||||
<script src="/js/offline-search.js"></script>
|
||||
{{end}}
|
||||
{{ partial "hooks/head-end.html" . }}
|
||||
|
||||
<!-- Docsy head.html ends here -->
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
@@ -19,9 +53,7 @@
|
||||
"logo": "https://kubernetes.io/images/favicon.png"
|
||||
}
|
||||
</script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="theme-color" content="#326ce5">
|
||||
<link rel="shortcut icon" type="image/png" href="{{ "images/favicon.png" | relURL }}">
|
||||
{{ partial "css.html" . }}
|
||||
<!-- Content for social media sharing previews -->
|
||||
<!-- Facebook uses the og: stuff, while Twitter and others use twitter: -->
|
||||
@@ -43,9 +75,7 @@
|
||||
{{ end }}
|
||||
<meta property="og:type" content="{{ $ogType }}">
|
||||
<script src="{{ "js/anchor-4.1.1.min.js" | relURL }}"></script>
|
||||
<script src="{{ "js/jquery-3.2.1.min.js" | relURL }}"></script>
|
||||
<script src="{{ "js/jquery-ui-1.12.1.min.js" | relURL }}"></script>
|
||||
<script src="{{ "js/bootstrap-4.3.1.min.js" | relURL }}"></script>
|
||||
<script src="{{ "js/sweetalert-2.1.2.min.js" | relURL }}"></script>
|
||||
|
||||
{{ if eq .Params.mermaid true }}
|
||||
@@ -56,6 +86,4 @@
|
||||
<script src="{{ "js/script.js" | relURL }}"></script>
|
||||
<script src="{{ "js/custom-jekyll/tags.js" | relURL }}"></script>
|
||||
{{ with .Params.js }}{{ range (split . ",") }}<script src="{{ (trim . " ") | relURL }}"></script><!-- custom js added -->
|
||||
{{ end }}{{ else }}<!-- no custom js detected -->{{ end }}
|
||||
<link rel="manifest" href="/manifest.webmanifest">
|
||||
<link rel="apple-touch-icon" href="/images/kubernetes-192x192.png">
|
||||
{{ end }}{{ else }}<!-- no custom js detected -->{{ end }}
|
||||
Reference in New Issue
Block a user