From a77e3346bb4e5501b3fb09da25db37afa54ef631 Mon Sep 17 00:00:00 2001 From: "Kyle J. Davis" Date: Fri, 9 Feb 2024 08:59:12 -0700 Subject: [PATCH] adds shortcode for displaying current version and link to github + associated metadata --- content/en/_index.markdown | 2 ++ data/project_long_names.toml | 2 ++ data/repos/os.toml | 3 +++ layouts/shortcodes/current-full-version.html | 8 ++++++++ 4 files changed, 15 insertions(+) create mode 100644 data/project_long_names.toml create mode 100644 data/repos/os.toml create mode 100644 layouts/shortcodes/current-full-version.html diff --git a/content/en/_index.markdown b/content/en/_index.markdown index 20df3922..979988ed 100644 --- a/content/en/_index.markdown +++ b/content/en/_index.markdown @@ -3,6 +3,8 @@ type="docs" title="Documentation" +++ +{{< current-full-version >}} + You may be familiar with general purpose Linux distributions like Ubuntu, Fedora, or Amazon Linux. With these Linux distributions, you can run a variety of workloads, setup in a variety of ways. While Bottlerocket is also a Linux distribution, Bottlerocket stands in stark contrast to general purpose distributions by being specifically optimized to host containers and interoperate directly with container orchestrators such as Kubernetes or ECS. diff --git a/data/project_long_names.toml b/data/project_long_names.toml new file mode 100644 index 00000000..591a7e99 --- /dev/null +++ b/data/project_long_names.toml @@ -0,0 +1,2 @@ +os = "Bottlerocket OS" +brupop = "Bottlerocket Update Operator" \ No newline at end of file diff --git a/data/repos/os.toml b/data/repos/os.toml new file mode 100644 index 00000000..6904913a --- /dev/null +++ b/data/repos/os.toml @@ -0,0 +1,3 @@ +github = "https://github.com/bottlerocket-os/bottlerocket" +path_prefix = "/tree/develop" +github_issue_url = "https://github.com/bottlerocket-os/bottlerocket/issues/new/choose" \ No newline at end of file diff --git a/layouts/shortcodes/current-full-version.html b/layouts/shortcodes/current-full-version.html new file mode 100644 index 00000000..a4721c7a --- /dev/null +++ b/layouts/shortcodes/current-full-version.html @@ -0,0 +1,8 @@ +{{- $project_short := .Get "project" | default "os" -}} +{{- $repo_metadata := index $.Site.Data.repos $project_short -}} +{{- $full_version := print $.Site.Data.versions.current.os.major "." $.Site.Data.versions.current.os.minor "." $.Site.Data.versions.current.os.patch -}} +
+
+ The most recent release of {{ index $.Site.Data.project_long_names $project_short }} is {{ $full_version }} (Release Notes). +
+
\ No newline at end of file