Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING_DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Read the [Hugo installation instructions](https://gohugo.io/getting-started/inst
If you have [Docker](https://www.docker.com/get-started/) installed, there are fallbacks for all requirements in the [Makefile](Makefile), meaning you don't need to install them.

- [Installing Hugo](https://gohugo.io/getting-started/installing/)
- **NOTE**: We are currently running [Hugo v0.134.2](https://github.com/gohugoio/hugo/releases/tag/v0.134.2) in production.
- **NOTE**: We are currently running [Hugo v0.147.8](https://github.com/gohugoio/hugo/releases/tag/v0.147.8) in production.
- [Installing markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#installation)
- [Installing markdown-link-check](https://github.com/tcort/markdown-link-check?tab=readme-ov-file#installation)

Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
HUGO?=hugo
HUGO_VERSION?=$(shell hugo version 2>/dev/null | awk '{print $$2}' | cut -d '.' -f 2)
HUGO_IMG?=hugomods/hugo:std-go-git-0.134.3
HUGO_IMG?=hugomods/hugo:std-go-git-0.147.8

THEME_MODULE = github.com/nginxinc/nginx-hugo-theme

ifeq ($(shell [ $(HUGO_VERSION) -gt 133 2>/dev/null ] && echo true || echo false), true)
$(info Hugo is available and has a version greater than 133. Proceeding with build.)
ifeq ($(shell [ $(HUGO_VERSION) -gt 146 2>/dev/null ] && echo true || echo false), true)
$(info Hugo is available and has a version greater than 146. Proceeding with build.)
else
$(warning Hugo is not available or using a version less than 134. Attempting to use docker. HUGO_VERSION=$(HUGO_VERSION))
$(warning Hugo is not available or using a version less than 147. Attempting to use docker. HUGO_VERSION=$(HUGO_VERSION))
HUGO=docker run --rm -it -v ${CURDIR}:/src -p 1313:1313 ${HUGO_IMG} /src/hugo-entrypoint.sh
ifeq (, $(shell docker version 2> /dev/null))
$(error Hugo (>0.134) or Docker are required to build the local previews.)
$(error Hugo (>0.147) or Docker are required to build the local previews.)
endif
endif

Expand Down