From a6bd756729179766fba720e42c74f9b6e3159aa1 Mon Sep 17 00:00:00 2001 From: Josh Date: Wed, 27 Dec 2023 22:24:51 -0800 Subject: [PATCH 1/2] moving lastmod date to front matter --- site/content/pages/public-health.md | 4 +- site/content/pages/shift-code-of-conduct.md | 2 + .../s2b_hugo_theme/layouts/policy/single.html | 70 +++++++++++++++++++ .../s2b_hugo_theme/static/css/custom.css | 4 ++ 4 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 site/themes/s2b_hugo_theme/layouts/policy/single.html diff --git a/site/content/pages/public-health.md b/site/content/pages/public-health.md index 6d234c72..941383bc 100644 --- a/site/content/pages/public-health.md +++ b/site/content/pages/public-health.md @@ -12,6 +12,8 @@ weight: "7" menu: main: parent: communitynav +type: policy +lastmod: 2023-05-13 --- ## Ride safely @@ -70,5 +72,3 @@ If a ride leader agrees to follow these specific guidelines, a special marker wi If you have questions or concerns about the safety policies for a ride, past or upcoming, reach out to the ride leaders or [contact us](/pages/contact/). Shift reserves the right to moderate calendar listings, and this may include removing the COVID Safety Plan designation from a ride if we are aware that it does not follow this policy. Please note: These guidelines have changed over time as conditions and public health guidelines have evolved. For past rides, refer to the [page history](https://github.com/shift-org/shift-docs/commits/main/site/content/pages/public-health.md) on GitHub to determine the version of policies in place at that time. - -*Last updated: May 2023* diff --git a/site/content/pages/shift-code-of-conduct.md b/site/content/pages/shift-code-of-conduct.md index 9b1df585..f0d76462 100644 --- a/site/content/pages/shift-code-of-conduct.md +++ b/site/content/pages/shift-code-of-conduct.md @@ -4,6 +4,8 @@ weight: 2 menu: main: parent: aboutmenu +type: policy +lastmod: 2023-08-26 --- ## 1. Purpose diff --git a/site/themes/s2b_hugo_theme/layouts/policy/single.html b/site/themes/s2b_hugo_theme/layouts/policy/single.html new file mode 100644 index 00000000..c8430ade --- /dev/null +++ b/site/themes/s2b_hugo_theme/layouts/policy/single.html @@ -0,0 +1,70 @@ + + + + {{ partial "head.html" . }} + + + +
+ +
+ + {{ partial "nav.html" . }} + +
+ +
+ + {{ partial "breadcrumbs.html" . }} + +
+ {{ if isset .Params "id" }} + + {{ partial .Params.id . }} + + {{ else }} + +
+ +
+ +
+ +
+ {{ .Content }} +
+ +
+ + Last updated: {{ .Lastmod | time.Format .Site.Params.date_format }} + + + +
+
+ +
+ + +
+ + + {{ end }} +
+ + +
+ +
+ + {{ partial "footer.html" . }} + +
+ +
+ + + {{ partial "scripts.html" . }} + + + diff --git a/site/themes/s2b_hugo_theme/static/css/custom.css b/site/themes/s2b_hugo_theme/static/css/custom.css index 1194e663..4f7ce845 100644 --- a/site/themes/s2b_hugo_theme/static/css/custom.css +++ b/site/themes/s2b_hugo_theme/static/css/custom.css @@ -94,3 +94,7 @@ main .donate a { forced-color-adjust: auto; } } + +.lastmod { + font-style: italic; +} From 0f4a9bca952416c57bace8970747a9e4b6c10137 Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 26 Feb 2024 22:49:50 -0800 Subject: [PATCH 2/2] updating config --- site/config.toml | 4 +++- site/content/pages/public-health.md | 1 - site/content/pages/shift-code-of-conduct.md | 1 - site/themes/s2b_hugo_theme/layouts/policy/single.html | 4 ---- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/site/config.toml b/site/config.toml index 0b007e54..b5fd4475 100644 --- a/site/config.toml +++ b/site/config.toml @@ -12,6 +12,9 @@ defaultContentLanguage = "en" # Define the number of posts per page paginate = 10 +# Required to read lastmod date from file +# enableGitInfo = true + [menu] [[menu.main]] @@ -105,7 +108,6 @@ paginate = 10 editURL = "/admin/#/collections/" description = "Shift website reboot documents" disableAssetsBusting = true # netlify doesn't need that - enableGitInfo = true # Google Maps API key (if not set will default to not passing a key.) googleMapsApiKey = "AIzaSyCFhtWLJcE30xOAjcbSFi-0fnoVmQZPb1Y" diff --git a/site/content/pages/public-health.md b/site/content/pages/public-health.md index 941383bc..f2e9b708 100644 --- a/site/content/pages/public-health.md +++ b/site/content/pages/public-health.md @@ -13,7 +13,6 @@ menu: main: parent: communitynav type: policy -lastmod: 2023-05-13 --- ## Ride safely diff --git a/site/content/pages/shift-code-of-conduct.md b/site/content/pages/shift-code-of-conduct.md index f0d76462..2fc460f3 100644 --- a/site/content/pages/shift-code-of-conduct.md +++ b/site/content/pages/shift-code-of-conduct.md @@ -5,7 +5,6 @@ menu: main: parent: aboutmenu type: policy -lastmod: 2023-08-26 --- ## 1. Purpose diff --git a/site/themes/s2b_hugo_theme/layouts/policy/single.html b/site/themes/s2b_hugo_theme/layouts/policy/single.html index c8430ade..e552a06b 100644 --- a/site/themes/s2b_hugo_theme/layouts/policy/single.html +++ b/site/themes/s2b_hugo_theme/layouts/policy/single.html @@ -35,11 +35,7 @@
- Last updated: {{ .Lastmod | time.Format .Site.Params.date_format }} - - -