diff --git a/config.toml b/config.toml index ff7ed73138..9cd287d00a 100644 --- a/config.toml +++ b/config.toml @@ -78,6 +78,11 @@ nextUrl = "https://kubernetes-io-vnext-staging.netlify.com/" githubWebsiteRepo = "github.com/kubernetes/website" githubWebsiteRaw = "raw.githubusercontent.com/kubernetes/website" +# param for displaying an announcement block on every page; see PR #16210 +announcement = false +# announcement_message is only displayed when announcement = true; update with your specific message +announcement_message = "The Kubernetes Documentation team would like your feedback! Please take a short survey so we can improve the Kubernetes online documentation." + [[params.versions]] fullversion = "v1.15.0" version = "v1.15" diff --git a/content/en/_index.html b/content/en/_index.html index 7813606b80..39e9796be0 100644 --- a/content/en/_index.html +++ b/content/en/_index.html @@ -3,6 +3,7 @@ title: "Production-Grade Container Orchestration" abstract: "Automated container deployment, scaling, and management" cid: home --- +{{< announcement >}} {{< deprecationwarning >}} diff --git a/layouts/docs/baseof.html b/layouts/docs/baseof.html index 39fc908057..11342585f1 100644 --- a/layouts/docs/baseof.html +++ b/layouts/docs/baseof.html @@ -11,12 +11,13 @@ {{ partial "docs/top-menu.html" . }} {{ end }} + {{ block "announcement" . }}{{ partial "announcement.html" . }}{{ end }} {{ block "deprecation" . }}{{ partial "deprecation-warning.html" . }}{{ end }}
{{ block "side-menu" . }}{{ end }}
{{ block "content" . }}{{ end }} - + {{ partial "feedback.html" . }} {{ partial "git-info.html" . }} diff --git a/layouts/partials/announcement.html b/layouts/partials/announcement.html new file mode 100644 index 0000000000..33f6f1c86c --- /dev/null +++ b/layouts/partials/announcement.html @@ -0,0 +1,11 @@ +{{ if .Param "announcement"}} +
+
+
+

+ {{ .Param "announcement_message" | markdownify }} +

+
+
+
+{{ end }} \ No newline at end of file diff --git a/layouts/shortcodes/announcement.html b/layouts/shortcodes/announcement.html new file mode 100644 index 0000000000..b1b0ef0c2b --- /dev/null +++ b/layouts/shortcodes/announcement.html @@ -0,0 +1,11 @@ +{{ if .Page.Param "announcement" }} +
+
+
+

+ {{ .Page.Param "announcement_message" | markdownify }} +

+
+
+
+{{ end }} \ No newline at end of file diff --git a/static/css/announcement.css b/static/css/announcement.css new file mode 100644 index 0000000000..2819cba501 --- /dev/null +++ b/static/css/announcement.css @@ -0,0 +1,6 @@ +.announcement { + padding: 20px; + margin: 20px 0; + border-radius: 3px; + background-color: #eeeeee; +} \ No newline at end of file