Skip to content

Commit

Permalink
Upgrade hugo and docsy theme
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
djjuhasz committed May 2, 2024
1 parent c38b1c1 commit afd1af6
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 100 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions hack/make/dep_hugo.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
8 changes: 4 additions & 4 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions website/go.mod
Original file line number Diff line number Diff line change
@@ -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
14 changes: 7 additions & 7 deletions website/go.sum
Original file line number Diff line number Diff line change
@@ -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=
59 changes: 27 additions & 32 deletions website/config.toml → website/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/"
Expand All @@ -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

Expand Down Expand Up @@ -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 <a href="https://github.com/USERNAME/REPOSITORY/issues/new">tell us how we can improve</a>.'
no = 'Sorry to hear that. Please <a href="https://github.com/USERNAME/REPOSITORY/issues/new">tell us how we can improve</a>.'
# Set to true to show an About link in the site footer
footer_about_enable = true

[params.links]

Expand Down
Loading

0 comments on commit afd1af6

Please sign in to comment.