0625ced466
* 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.
89 lines
4.0 KiB
HTML
89 lines
4.0 KiB
HTML
{{- $isBlogPost := eq .Section "blog" }}
|
|
{{- $ogType := cond (.IsHome) "website" "article" }}
|
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-36037335-10"></script>
|
|
<script>
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag(){dataLayer.push(arguments);}
|
|
gtag('js', new Date());
|
|
|
|
gtag('config', 'UA-36037335-10');
|
|
</script>
|
|
|
|
<!-- Docsy head.html begins here -->
|
|
|
|
<meta charset="utf-8">
|
|
<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",
|
|
"@type": "Organization",
|
|
"url": "https://kubernetes.io",
|
|
"logo": "https://kubernetes.io/images/favicon.png"
|
|
}
|
|
</script>
|
|
<meta name="theme-color" content="#326ce5">
|
|
{{ partial "css.html" . }}
|
|
<!-- Content for social media sharing previews -->
|
|
<!-- Facebook uses the og: stuff, while Twitter and others use twitter: -->
|
|
<meta name="description" content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Summary }}{{ end }}">
|
|
<meta property="og:description" content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Summary }}{{ end }}">
|
|
<meta name="twitter:description" content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Summary }}{{ end }}">
|
|
<meta property="og:url" content="{{ .Permalink }}">
|
|
<meta property="og:title" content="{{ if .Params.title }}{{ .Title }}{{ else }}{{ .Summary | truncate 10 }}{{ end }}">
|
|
<meta name="twitter:title" content="{{ if .Params.title }}{{ .Title }}{{ else }}{{ .Summary | truncate 10 }}{{ end }}">
|
|
<meta name="twitter:image" content="https://kubernetes.io/images/favicon.png" />
|
|
<!-- Alt text for the site image -->
|
|
<meta name="twitter:image:alt" content="{{ site.Title }}">
|
|
{{ if $isBlogPost }}
|
|
{{ with findRE "<img.*?>" .Content 1 }}
|
|
<meta property="og:image" content="{{ index . 0 | replaceRE ".*src=\"(.+?)\".*" "$1" }}">
|
|
{{ end }}
|
|
{{ else }}
|
|
<meta property="og:image" content="{{ "/images/kubernetes-horizontal-color.png" | relURL }}">
|
|
{{ end }}
|
|
<meta property="og:type" content="{{ $ogType }}">
|
|
<script src="{{ "js/anchor-4.1.1.min.js" | relURL }}"></script>
|
|
<script src="{{ "js/jquery-ui-1.12.1.min.js" | relURL }}"></script>
|
|
<script src="{{ "js/sweetalert-2.1.2.min.js" | relURL }}"></script>
|
|
|
|
{{ if eq .Params.mermaid true }}
|
|
<!-- Copied from https://unpkg.com/mermaid@8.5.0/dist/mermaid.min.js -->
|
|
<script async src="{{ "js/mermaid.min.js" | relURL }}"></script>
|
|
{{ end }}
|
|
|
|
<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 }} |