From afd1af66ebd99da529ff4cb0cefe804fff61cda3 Mon Sep 17 00:00:00 2001 From: David Juhasz Date: Wed, 1 May 2024 16:02:39 -0700 Subject: [PATCH] Upgrade hugo and docsy theme - Update hugo binary URL to download extended version - Rename "config.toml" to "hugo.toml" - Update hugo config values where necessary - Add a go workspace with base enduro and website modules --- Makefile | 2 + hack/make/dep_hugo.mk | 20 +++---- netlify.toml | 8 +-- website/go.mod | 4 +- website/go.sum | 14 ++--- website/{config.toml => hugo.toml} | 59 +++++++++----------- website/package-lock.json | 88 ++++++++++++++++-------------- website/package.json | 5 +- 8 files changed, 100 insertions(+), 100 deletions(-) rename website/{config.toml => hugo.toml} (69%) diff --git a/Makefile b/Makefile index c49a4d8b..651373fa 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,8 @@ PACKAGES := $(shell go list ./...) TEST_PACKAGES := $(filter-out $(IGNORED_PACKAGES),$(PACKAGES)) TEST_IGNORED_PACKAGES := $(filter $(IGNORED_PACKAGES),$(PACKAGES)) +export PATH:=$(GOBIN):$(PATH) + run: # @HELP Builds and run the enduro binary. run: build ./build/enduro diff --git a/hack/make/dep_hugo.mk b/hack/make/dep_hugo.mk index 36474b57..9f015415 100644 --- a/hack/make/dep_hugo.mk +++ b/hack/make/dep_hugo.mk @@ -5,18 +5,18 @@ $(call _assert_var,UNAME_ARCH2) $(call _assert_var,CACHE_VERSIONS) $(call _assert_var,CACHE_BIN) -HUGO_VERSION ?= 0.117.0 +HUGO_VERSION ?= 0.125.5 HUGO := $(CACHE_VERSIONS)/hugo/$(HUGO_VERSION) $(HUGO): - @rm -f $(CACHE_BIN)/hugo - @mkdir -p $(CACHE_BIN) + rm -f $(CACHE_BIN)/hugo + mkdir -p $(CACHE_BIN) $(eval TMP := $(shell mktemp -d)) - @curl -sSL \ - "https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_$(HUGO_VERSION)_$(UNAME_OS2)-$(UNAME_ARCH2).tar.gz" \ + curl -sSL \ + "https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_extended_$(HUGO_VERSION)_$(UNAME_OS2)-$(UNAME_ARCH2).tar.gz" \ | tar xz -C $(TMP) - @mv $(TMP)/hugo $(CACHE_BIN)/ - @chmod +x $(CACHE_BIN)/hugo - @rm -rf $(dir $(HUGO)) - @mkdir -p $(dir $(HUGO)) - @touch $(HUGO) + mv $(TMP)/hugo $(CACHE_BIN)/ + chmod +x $(CACHE_BIN)/hugo + rm -rf $(dir $(HUGO)) + mkdir -p $(dir $(HUGO)) + touch $(HUGO) diff --git a/netlify.toml b/netlify.toml index dcd3bc2d..398b33ee 100644 --- a/netlify.toml +++ b/netlify.toml @@ -8,25 +8,25 @@ ignore = "cd ..; git diff --quiet HEAD^ HEAD ./website ./internal/api/gen/http/o command = "hugo --gc --minify --enableGitInfo" [context.split1.environment] -HUGO_VERSION = "0.115.3" +HUGO_VERSION = "0.125.5" HUGO_ENV = "production" [context.deploy-preview] command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL" [context.deploy-preview.environment] -HUGO_VERSION = "0.115.3" +HUGO_VERSION = "0.125.5" [context.branch-deploy] command = "hugo --gc --minify -b $DEPLOY_PRIME_URL" [context.branch-deploy.environment] -HUGO_VERSION = "0.115.3" +HUGO_VERSION = "0.125.5" [context.next.environment] HUGO_ENABLEGITINFO = "true" [context.production.environment] -HUGO_VERSION = "0.115.3" +HUGO_VERSION = "0.125.5" HUGO_ENV = "production" HUGO_ENABLEGITINFO = "true" diff --git a/website/go.mod b/website/go.mod index 6d48602d..de254048 100644 --- a/website/go.mod +++ b/website/go.mod @@ -1,5 +1,5 @@ module github.com/artefactual-labs/enduro/website -go 1.20 +go 1.22.2 -require github.com/google/docsy v0.7.1 // indirect +require github.com/google/docsy v0.10.0 // indirect diff --git a/website/go.sum b/website/go.sum index 1069a695..11c3d88a 100644 --- a/website/go.sum +++ b/website/go.sum @@ -1,8 +1,8 @@ -github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= -github.com/google/docsy v0.7.0 h1:JaeZ0/KufX/BJ3SyATb/fmZa1DFI7o5d9KU+i6+lLJY= -github.com/google/docsy v0.7.0/go.mod h1:5WhIFchr5BfH6agjcInhpLRz7U7map0bcmKSpcrg6BE= -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.0/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4= -github.com/google/docsy/dependencies v0.7.1/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4= +github.com/FortAwesome/Font-Awesome v0.0.0-20240108205627-a1232e345536/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= +github.com/FortAwesome/Font-Awesome v0.0.0-20240402185447-c0f460dca7f7/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= +github.com/google/docsy v0.9.1 h1:+jqges1YCd+yHeuZ1BUvD8V8mEGVtPxULg5j/vaJ984= +github.com/google/docsy v0.9.1/go.mod h1:saOqKEUOn07Bc0orM/JdIF3VkOanHta9LU5Y53bwN2U= +github.com/google/docsy v0.10.0 h1:6tMDacPwAyRWNCfvsn/9qGOZDQ8b0aRzjRZvnZPY5dg= +github.com/google/docsy v0.10.0/go.mod h1:c0nIAqmRTOuJ01F85U/wJPQtc3Zj9N58Kea9bOT2AJc= github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= +github.com/twbs/bootstrap v5.3.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= diff --git a/website/config.toml b/website/hugo.toml similarity index 69% rename from website/config.toml rename to website/hugo.toml index 8417a146..78adbf17 100644 --- a/website/config.toml +++ b/website/hugo.toml @@ -3,20 +3,25 @@ title = "Enduro" enableRobotsTXT = true -# Hugo allows theme composition (and inheritance). The precedence is from left to right. -theme = ["github.com/google/docsy", "github.com/google/docsy/dependencies"] - -# Will give values to .Lastmod etc. -enableGitInfo = true - # Language settings contentDir = "content/en" defaultContentLanguage = "en" defaultContentLanguageInSubdir = false + # Useful when translating. enableMissingTranslationPlaceholders = true -disableKinds = ["taxonomy", "taxonomyTerm"] +[languages] +[languages.en.params] +title = "Enduro" +description = "Enduro is a POC automation tool to build fault-tolerant workflows using Archivematica." +languageName = "English" +weight = 1 + +# Will give values to .Lastmod etc. +enableGitInfo = true + +disableKinds = ["taxonomy", "term"] # Highlighting config pygmentsCodeFences = true @@ -27,6 +32,18 @@ pygmentsUseClassic = false # See https://help.farbox.com/pygments.html pygmentsStyle = "tango" +# Configure docsy theme module +[module] +proxy = "direct" +# uncomment line below for temporary local development of module +# replacements = "github.com/google/docsy -> ../../docsy" +[module.hugoVersion] +extended = true +min = "0.110.0" +[[module.imports]] +path = "github.com/google/docsy" +disable = false + # Configure how URLs look like per section. [permalinks] blog = "/:section/:year/:month/:day/:slug/" @@ -42,19 +59,7 @@ latexDashes = true [imaging] resampleFilter = "CatmullRom" quality = 75 -anchor = "smart" - -[services] -[services.googleAnalytics] -# id = "UA-00000000-0" - -[languages] -[languages.en.params] -title = "Enduro" -description = "Enduro is a POC automation tool to build fault-tolerant workflows using Archivematica." -languageName ="English" -weight = 1 - +anchor = "Smart" # Everything below this are Site Params @@ -90,18 +95,8 @@ breadcrumb_disable = false sidebar_search_disable = false # Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top nav bar navbar_logo = false -# Set to true to disable the About link in the site footer -footer_about_disable = false - -# Adds a H2 section titled "Feedback" to the bottom of each doc. The responses are sent to Google Analytics as events. -# This feature depends on [services.googleAnalytics] and will be disabled if "services.googleAnalytics.id" is not set. -# If you want this feature, but occasionally need to remove the "Feedback" section from a single page, -# add "hide_feedback: true" to the page's front matter. -[params.ui.feedback] -enable = false -# The responses that the user sees after clicking "yes" (the page was helpful) or "no" (the page was not helpful). -yes = 'Glad to hear it! Please tell us how we can improve.' -no = 'Sorry to hear that. Please tell us how we can improve.' +# Set to true to show an About link in the site footer +footer_about_enable = true [params.links] diff --git a/website/package-lock.json b/website/package-lock.json index 74531b13..3da5eb27 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -9,9 +9,9 @@ "version": "0.0.1", "license": "ISC", "devDependencies": { - "autoprefixer": "^10.4.16", + "autoprefixer": "^10.4.19", "npm-check-updates": "^16.14.5", - "postcss": "^8.4.31", + "postcss": "^8.4.38", "postcss-cli": "^10.1.0" } }, @@ -479,9 +479,9 @@ } }, "node_modules/autoprefixer": { - "version": "10.4.16", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.16.tgz", - "integrity": "sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==", + "version": "10.4.19", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz", + "integrity": "sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==", "dev": true, "funding": [ { @@ -498,9 +498,9 @@ } ], "dependencies": { - "browserslist": "^4.21.10", - "caniuse-lite": "^1.0.30001538", - "fraction.js": "^4.3.6", + "browserslist": "^4.23.0", + "caniuse-lite": "^1.0.30001599", + "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", "postcss-value-parser": "^4.2.0" @@ -615,9 +615,9 @@ } }, "node_modules/browserslist": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", - "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "funding": [ { @@ -634,9 +634,9 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001541", - "electron-to-chromium": "^1.4.535", - "node-releases": "^2.0.13", + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", "update-browserslist-db": "^1.0.13" }, "bin": { @@ -740,9 +740,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001547", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz", - "integrity": "sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA==", + "version": "1.0.30001614", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001614.tgz", + "integrity": "sha512-jmZQ1VpmlRwHgdP1/uiKzgiAuGOfLEJsYFP4+GBou/QQ4U6IOJCB4NP1c+1p9RGLpwObcT94jA5/uO+F1vBbog==", "dev": true, "funding": [ { @@ -1098,9 +1098,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.4.549", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.549.tgz", - "integrity": "sha512-gpXfJslSi4hYDkA0mTLEpYKRv9siAgSUgZ+UWyk+J5Cttpd1ThCVwdclzIwQSclz3hYn049+M2fgrP1WpvF8xg==", + "version": "1.4.752", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.752.tgz", + "integrity": "sha512-P3QJreYI/AUTcfBVrC4zy9KvnZWekViThgQMX/VpJ+IsOBbcX5JFpORM4qWapwWQ+agb2nYAOyn/4PMXOk0m2Q==", "dev": true }, "node_modules/emoji-regex": { @@ -1134,9 +1134,10 @@ "dev": true }, "node_modules/escalade": { - "version": "3.1.1", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -1255,9 +1256,9 @@ } }, "node_modules/fraction.js": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.6.tgz", - "integrity": "sha512-n2aZ9tNfYDwaHhvFTkhFErqOMIb8uyzSQ+vGJBjZyanAKZVbGUQ1sngfk9FdkBw7G26O7AgNjLcecLffD1c7eg==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", "dev": true, "engines": { "node": "*" @@ -2275,7 +2276,9 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.3.6", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, "funding": [ { @@ -2283,7 +2286,6 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -2398,9 +2400,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node_modules/nopt": { @@ -2870,9 +2872,9 @@ } }, "node_modules/postcss": { - "version": "8.4.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", - "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "dev": true, "funding": [ { @@ -2889,9 +2891,9 @@ } ], "dependencies": { - "nanoid": "^3.3.6", + "nanoid": "^3.3.7", "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" @@ -2899,8 +2901,9 @@ }, "node_modules/postcss-cli": { "version": "10.1.0", + "resolved": "https://registry.npmjs.org/postcss-cli/-/postcss-cli-10.1.0.tgz", + "integrity": "sha512-Zu7PLORkE9YwNdvOeOVKPmWghprOtjFQU3srMUGbdz3pHJiFh7yZ4geiZFMkjMfB0mtTFR3h8RemR62rPkbOPA==", "dev": true, - "license": "MIT", "dependencies": { "chokidar": "^3.3.0", "dependency-graph": "^0.11.0", @@ -3495,9 +3498,10 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -3787,9 +3791,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.14.tgz", + "integrity": "sha512-JixKH8GR2pWYshIPUg/NujK3JO7JiqEEUiNArE86NQyrgUuZeTlZQN3xuS/yiV5Kb48ev9K6RqNkaJjXsdg7Jw==", "dev": true, "funding": [ { @@ -3806,7 +3810,7 @@ } ], "dependencies": { - "escalade": "^3.1.1", + "escalade": "^3.1.2", "picocolors": "^1.0.0" }, "bin": { diff --git a/website/package.json b/website/package.json index 45787ea5..4d129bb6 100644 --- a/website/package.json +++ b/website/package.json @@ -13,11 +13,10 @@ "url": "https://github.com/artefactual-labs/enduro/issues" }, "homepage": "https://github.com/artefactual-labs/enduro", - "dependencies": {}, "devDependencies": { - "autoprefixer": "^10.4.16", + "autoprefixer": "^10.4.19", "npm-check-updates": "^16.14.5", - "postcss": "^8.4.31", + "postcss": "^8.4.38", "postcss-cli": "^10.1.0" } }