Skip to content

Commit

Permalink
Docs theme updates (#3751)
Browse files Browse the repository at this point in the history
* update docs configs to use hugo theme from github

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* corrects the environment referenced in the docs/Makefile

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
jputrino and pre-commit-ci[bot] authored Apr 14, 2023
1 parent 082a7c0 commit 35c985d
Show file tree
Hide file tree
Showing 283 changed files with 44 additions and 150,748 deletions.
59 changes: 34 additions & 25 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,40 +1,49 @@
LOCAL_ROOT = $(git rev-parse --show-toplevel)
SHELL = /bin/bash
THEME_MODULE = gitlab.com/f5/nginx/controller/poc/f5-hugo
# export THEME_PATH="</local/path/to/theme>"
THEME_PATH = $(LOCAL_THEME_PATH)
THEME_BRANCH = development
THEME_MODULE = github.com/nginxinc/nginx-hugo-theme
## Pulls the current theme version from the Netlify settings
THEME_VERSION = $(NGINX_THEME_VERSION)

.PHONY: all all-local clean hugo-mod build-production build-staging hugo-server-drafts hugo-server
.PHONY: all clean hugo-mod build-production build-staging hugo-server-drafts hugo-server netlify

all: hugo-mod build-production

all-local: clean hugo-mod build-production
all-staging: hugo-mod build-staging

all-dev: hugo-mod build-dev

# Removes the public directory generated by the `hugo` command
clean:
rm -rf ${LOCAL_ROOT}/public
if [[ -d ${PWD}/public ]] ; then rm -rf ${PWD}/public && echo "Removed public directory" ; else echo "Did not find a public directory to remove" ; fi

hugo-mod:
hugo mod clean
rm -rf _vendor
hugo mod get
hugo mod vendor
hugo mod get $(THEME_MODULE)@v$(THEME_VERSION)

# Builds using the Hugo "production" environment
# For deploys to docs.nginx.com only
build-production:
hugo --gc -e production

# Builds using the Hugo "staging" environment
# For deploys to docs-staging.nginx.com only
build-staging:
hugo --gc -e staging

hugo-server-drafts:
hugo server -e production -b 127.0.0.1/nginx-ingress-controller/ -D --disableFastRender

hugo-server:
hugo server -e production -b 127.0.0.1/nginx-ingress-controller/ --disableFastRender

netlify:
netlify build --context=branch-deploy
netlify deploy -d public

replace-theme:
go mod edit -replace "$(THEME_MODULE)"="$(THEME_PATH)"
# Builds using the Hugo "development" environment
# For deploys to docs-dev.nginx.com only
build-dev:
hugo --gc -e development

# Runs the Hugo server with content marked as draft
# Serves docs at localhost:1313
docs-drafts:
hugo server -D --disableFastRender

# Runs the Hugo server
# Serves docs at localhost:1313
docs:
hugo server --disableFastRender

# Can be used to deploy to netlify from your local
# development environment.
# Requires a netlify login.
netlify: clean
netlify deploy --build -d public --alias $(shell git branch --show-current)-branch

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 35c985d

Please sign in to comment.