From da3cd4b7c5e2e36c01251589854895d44ac0ec97 Mon Sep 17 00:00:00 2001 From: Bervianto Leo Pratama Date: Thu, 10 Jul 2025 07:21:56 +0000 Subject: [PATCH 1/4] fix: update hugo version --- .gitignore | 2 ++ .gitpod.yml | 11 +++++++++++ Dockerfile | 5 ----- docker-compose.yaml | 6 +----- go.mod | 7 +++++-- go.sum | 9 ++++++--- hugo.toml | 9 +++++---- layouts/architecture/list.html | 2 +- layouts/community/list.html | 2 +- layouts/learn/list.html | 2 +- layouts/resources/list.html | 2 +- netlify.toml | 2 +- 12 files changed, 35 insertions(+), 24 deletions(-) create mode 100644 .gitpod.yml delete mode 100644 Dockerfile diff --git a/.gitignore b/.gitignore index 6379857..0656b13 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ node_modules/ # Hugo .hugo_build.lock + +public/ \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..09fbb10 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,11 @@ +# This configuration file was automatically generated by Gitpod. +# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) +# and commit this file to your remote git repository to share the goodness with others. + +# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart + +tasks: + - init: go get && go build ./... && go test ./... && npm install + command: go run . + + diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index d525d3b..0000000 --- a/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -# This image is to latest than which one is running online -# FROM klakegg/hugo:ext-alpine -FROM klakegg/hugo@sha256:b66d1bca06dea66dc713a960b290e8df193cb922e09051aecb0fe932e799d652 as hugo_0-88-1 - -RUN apk add git diff --git a/docker-compose.yaml b/docker-compose.yaml index 608144c..d701880 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,11 +1,7 @@ -version: "3.3" - services: site: - image: docsy/cdf-best-practices - build: - context: . + image: hugomods/hugo:dart-sass-go-git-0.147.9 command: server ports: - "1313:1313" diff --git a/go.mod b/go.mod index 9296317..d6ad240 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,8 @@ module github.com/cdfoundation/best-practices-site -go 1.20 +go 1.24 -require github.com/google/docsy v0.7.1 // indirect +require ( + github.com/google/docsy v0.12.0 // indirect + github.com/google/docsy/dependencies v0.7.2 // indirect +) diff --git a/go.sum b/go.sum index d9ed4c5..a130a73 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,8 @@ github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= -github.com/google/docsy v0.7.1 h1:DUriA7Nr3lJjNi9Ulev1SfiG1sUYmvyDeU4nTp7uDxY= -github.com/google/docsy v0.7.1/go.mod h1:JCmE+c+izhE0Rvzv3y+AzHhz1KdwlA9Oj5YBMklJcfc= -github.com/google/docsy/dependencies v0.7.1/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4= +github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= +github.com/google/docsy v0.12.0 h1:CddZKL39YyJzawr8GTVaakvcUTCJRAAYdz7W0qfZ2P4= +github.com/google/docsy v0.12.0/go.mod h1:1bioDqA493neyFesaTvQ9reV0V2vYy+xUAnlnz7+miM= +github.com/google/docsy/dependencies v0.7.2 h1:+t5ufoADQAj4XneFphz4A+UU0ICAxmNaRHVWtMYXPSI= +github.com/google/docsy/dependencies v0.7.2/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4= github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= +github.com/twbs/bootstrap v5.3.6+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= diff --git a/hugo.toml b/hugo.toml index a08a620..7263589 100644 --- a/hugo.toml +++ b/hugo.toml @@ -156,9 +156,6 @@ github_branch= "main" # Google Custom Search Engine ID. Remove or comment out to disable search. # gcs_engine_id = "d72aa9b2712488cc3" -# Enable Algolia DocSearch -algolia_docsearch = false - # Enable Lunr.js offline search offlineSearch = false @@ -170,7 +167,7 @@ prism_syntax_highlighting = false # Set to true to disable breadcrumb navigation. breadcrumb_disable = false # Set to true to disable the About link in the site footer -footer_about_disable = false +footer_about_enable = true # Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top navbar navbar_logo = true # Set to true if you don't want the top navbar to be translucent when over a `block/cover`, like on the homepage. @@ -205,3 +202,7 @@ enable = false icon = "fab fa-github" desc = "Development takes place here!" +[params.search.algolia] +appId = "" +apiKey = "" +indexName = "docsearch" \ No newline at end of file diff --git a/layouts/architecture/list.html b/layouts/architecture/list.html index 376ed81..684cd33 100644 --- a/layouts/architecture/list.html +++ b/layouts/architecture/list.html @@ -14,7 +14,7 @@

{{ .Title }}

{{ partial "feedback.html" .Site.Params.ui.feedback -}}
{{ end -}} - {{ if (.Site.DisqusShortname) -}} + {{ if (.Site.Config.Services.Disqus.Shortname) -}}
{{- partial "disqus-comment.html" . -}} {{ end -}} diff --git a/layouts/community/list.html b/layouts/community/list.html index 376ed81..684cd33 100644 --- a/layouts/community/list.html +++ b/layouts/community/list.html @@ -14,7 +14,7 @@

{{ .Title }}

{{ partial "feedback.html" .Site.Params.ui.feedback -}}
{{ end -}} - {{ if (.Site.DisqusShortname) -}} + {{ if (.Site.Config.Services.Disqus.Shortname) -}}
{{- partial "disqus-comment.html" . -}} {{ end -}} diff --git a/layouts/learn/list.html b/layouts/learn/list.html index 376ed81..684cd33 100644 --- a/layouts/learn/list.html +++ b/layouts/learn/list.html @@ -14,7 +14,7 @@

{{ .Title }}

{{ partial "feedback.html" .Site.Params.ui.feedback -}}
{{ end -}} - {{ if (.Site.DisqusShortname) -}} + {{ if (.Site.Config.Services.Disqus.Shortname) -}}
{{- partial "disqus-comment.html" . -}} {{ end -}} diff --git a/layouts/resources/list.html b/layouts/resources/list.html index 376ed81..684cd33 100644 --- a/layouts/resources/list.html +++ b/layouts/resources/list.html @@ -14,7 +14,7 @@

{{ .Title }}

{{ partial "feedback.html" .Site.Params.ui.feedback -}}
{{ end -}} - {{ if (.Site.DisqusShortname) -}} + {{ if (.Site.Config.Services.Disqus.Shortname) -}}
{{- partial "disqus-comment.html" . -}} {{ end -}} diff --git a/netlify.toml b/netlify.toml index 054e422..bfd2094 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,3 +1,3 @@ [build] [build.environment] -HUGO_VERSION = "0.115.4" +HUGO_VERSION = "0.147.9" From 498595e49834032a76b72d6d1d0d92e7100f0595 Mon Sep 17 00:00:00 2001 From: Bervianto Leo Pratama Date: Thu, 10 Jul 2025 14:29:45 +0700 Subject: [PATCH 2/4] Update .gitignore --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0656b13..6379857 100644 --- a/.gitignore +++ b/.gitignore @@ -14,5 +14,3 @@ node_modules/ # Hugo .hugo_build.lock - -public/ \ No newline at end of file From 826cb3acae6eb9bb3601f09addbca40b67b34938 Mon Sep 17 00:00:00 2001 From: Bervianto Leo Pratama Date: Thu, 10 Jul 2025 14:30:19 +0700 Subject: [PATCH 3/4] Delete .gitpod.yml --- .gitpod.yml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .gitpod.yml diff --git a/.gitpod.yml b/.gitpod.yml deleted file mode 100644 index 09fbb10..0000000 --- a/.gitpod.yml +++ /dev/null @@ -1,11 +0,0 @@ -# This configuration file was automatically generated by Gitpod. -# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) -# and commit this file to your remote git repository to share the goodness with others. - -# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart - -tasks: - - init: go get && go build ./... && go test ./... && npm install - command: go run . - - From 6635e7401a81fbeca8e24265e41eea7716624b69 Mon Sep 17 00:00:00 2001 From: Bervianto Leo Pratama Date: Sat, 12 Jul 2025 07:09:10 +0000 Subject: [PATCH 4/4] fix: update single.html to be the same as list.html --- .../{shortcodes => _shortcodes}/cdf/br.html | 0 .../cdf/dblbr.html | 0 .../{shortcodes => _shortcodes}/cdf/pad.html | 0 layouts/architecture/single.html | 24 +++++++++++++++++-- layouts/community/single.html | 24 +++++++++++++++++-- layouts/learn/single.html | 24 +++++++++++++++++-- layouts/resources/single.html | 24 +++++++++++++++++-- 7 files changed, 88 insertions(+), 8 deletions(-) rename layouts/{shortcodes => _shortcodes}/cdf/br.html (100%) rename layouts/{shortcodes => _shortcodes}/cdf/dblbr.html (100%) rename layouts/{shortcodes => _shortcodes}/cdf/pad.html (100%) diff --git a/layouts/shortcodes/cdf/br.html b/layouts/_shortcodes/cdf/br.html similarity index 100% rename from layouts/shortcodes/cdf/br.html rename to layouts/_shortcodes/cdf/br.html diff --git a/layouts/shortcodes/cdf/dblbr.html b/layouts/_shortcodes/cdf/dblbr.html similarity index 100% rename from layouts/shortcodes/cdf/dblbr.html rename to layouts/_shortcodes/cdf/dblbr.html diff --git a/layouts/shortcodes/cdf/pad.html b/layouts/_shortcodes/cdf/pad.html similarity index 100% rename from layouts/shortcodes/cdf/pad.html rename to layouts/_shortcodes/cdf/pad.html diff --git a/layouts/architecture/single.html b/layouts/architecture/single.html index 00cb3ab..684cd33 100644 --- a/layouts/architecture/single.html +++ b/layouts/architecture/single.html @@ -1,3 +1,23 @@ {{ define "main" }} -{{ .Render "content" }} -{{ end }} \ No newline at end of file +
+

{{ .Title }}

+ {{ with .Params.description }}
{{ . | markdownify }}
{{ end }} + + {{ .Content }} + {{ partial "section-index.html" . -}} + {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) -}} + {{ partial "feedback.html" .Site.Params.ui.feedback -}} +
+ {{ end -}} + {{ if (.Site.Config.Services.Disqus.Shortname) -}} +
+ {{- partial "disqus-comment.html" . -}} + {{ end -}} + {{ partial "page-meta-lastmod.html" . -}} +
+{{ end -}} diff --git a/layouts/community/single.html b/layouts/community/single.html index 00cb3ab..684cd33 100644 --- a/layouts/community/single.html +++ b/layouts/community/single.html @@ -1,3 +1,23 @@ {{ define "main" }} -{{ .Render "content" }} -{{ end }} \ No newline at end of file +
+

{{ .Title }}

+ {{ with .Params.description }}
{{ . | markdownify }}
{{ end }} + + {{ .Content }} + {{ partial "section-index.html" . -}} + {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) -}} + {{ partial "feedback.html" .Site.Params.ui.feedback -}} +
+ {{ end -}} + {{ if (.Site.Config.Services.Disqus.Shortname) -}} +
+ {{- partial "disqus-comment.html" . -}} + {{ end -}} + {{ partial "page-meta-lastmod.html" . -}} +
+{{ end -}} diff --git a/layouts/learn/single.html b/layouts/learn/single.html index 00cb3ab..684cd33 100644 --- a/layouts/learn/single.html +++ b/layouts/learn/single.html @@ -1,3 +1,23 @@ {{ define "main" }} -{{ .Render "content" }} -{{ end }} \ No newline at end of file +
+

{{ .Title }}

+ {{ with .Params.description }}
{{ . | markdownify }}
{{ end }} + + {{ .Content }} + {{ partial "section-index.html" . -}} + {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) -}} + {{ partial "feedback.html" .Site.Params.ui.feedback -}} +
+ {{ end -}} + {{ if (.Site.Config.Services.Disqus.Shortname) -}} +
+ {{- partial "disqus-comment.html" . -}} + {{ end -}} + {{ partial "page-meta-lastmod.html" . -}} +
+{{ end -}} diff --git a/layouts/resources/single.html b/layouts/resources/single.html index 00cb3ab..684cd33 100644 --- a/layouts/resources/single.html +++ b/layouts/resources/single.html @@ -1,3 +1,23 @@ {{ define "main" }} -{{ .Render "content" }} -{{ end }} \ No newline at end of file +
+

{{ .Title }}

+ {{ with .Params.description }}
{{ . | markdownify }}
{{ end }} + + {{ .Content }} + {{ partial "section-index.html" . -}} + {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) -}} + {{ partial "feedback.html" .Site.Params.ui.feedback -}} +
+ {{ end -}} + {{ if (.Site.Config.Services.Disqus.Shortname) -}} +
+ {{- partial "disqus-comment.html" . -}} + {{ end -}} + {{ partial "page-meta-lastmod.html" . -}} +
+{{ end -}}