Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs theme updates #3751

Merged
merged 5 commits into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
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 "staging" environment
jputrino marked this conversation as resolved.
Show resolved Hide resolved
# 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