Remove make targets using non npx-hugo, adjust Netlify config (#701)
Signed-off-by: Patrice Chalin <pchalin@gmail.com>
This commit is contained in:
parent
37e739bc2c
commit
79bfa6028b
|
@ -5,3 +5,4 @@ IgnoreAltMissing: true
|
|||
IgnoreEmptyHref: true
|
||||
IgnoreInternalURLs:
|
||||
- /docs/2.6/scalers/solace-pub-sub/ # Due to https://github.com/kedacore/keda-docs/issues/693
|
||||
- /docs/latest/scalers/solace-pub-sub/ # Due to https://github.com/kedacore/keda-docs/issues/693
|
||||
|
|
35
Makefile
35
Makefile
|
@ -3,8 +3,7 @@ HTMLTEST?=htmltest # Specify as make arg if different
|
|||
HTMLTEST_ARGS?=--skip-external
|
||||
|
||||
DOCS=public/docs
|
||||
LATEST_VERSION=$(shell grep -e '^docs' config.toml | grep -oe '\d\.\d' | head -1)
|
||||
LATEST_VERSION2=`grep -e '^docs' config.toml | grep -oe '\d\.\d' | head -1`
|
||||
LATEST_VERSION=$(shell grep -e '^docs' config.toml | grep -oe '[0-9][0-9]*.[0-9]' | head -1)
|
||||
|
||||
# Use $(HTMLTEST) in PATH, if available; otherwise, we'll get a copy
|
||||
ifeq (, $(shell which $(HTMLTEST)))
|
||||
|
@ -14,36 +13,15 @@ GET_LINK_CHECKER_IF_NEEDED=get-link-checker
|
|||
endif
|
||||
endif
|
||||
|
||||
build: clean
|
||||
hugo -e development -DFE
|
||||
|
||||
clean:
|
||||
rm -rf $(HTMLTEST_DIR) public/* resources
|
||||
|
||||
serve:
|
||||
hugo server \
|
||||
--buildDrafts \
|
||||
--buildFuture
|
||||
|
||||
production-build: clean
|
||||
hugo \
|
||||
--minify
|
||||
|
||||
preview-build: clean
|
||||
hugo -e development \
|
||||
--baseURL "$(DEPLOY_PRIME_URL)" \
|
||||
--buildDrafts \
|
||||
--buildFuture \
|
||||
--minify
|
||||
|
||||
open:
|
||||
open https://keda.sh
|
||||
|
||||
check-links: $(GET_LINK_CHECKER_IF_NEEDED) make-redirects-for-checking
|
||||
$(HTMLTEST) $(HTMLTEST_ARGS)
|
||||
find public/* -type l -ls -exec rm -f {} \;
|
||||
|
||||
make-redirects-for-checking:
|
||||
@if [ -z $(LATEST_VERSION) ]; then \
|
||||
echo "Failed to extract LATEST_VERSION. Cannot setup symlinks for checking"; \
|
||||
exit 1; \
|
||||
fi
|
||||
@echo "Creating symlinks of 'latest' to $(LATEST_VERSION) for the purpose of link checking"
|
||||
(cd public && rm -f scalers && ln -s docs/$(LATEST_VERSION)/scalers scalers)
|
||||
(cd public/docs && rm -f latest && ln -s $(LATEST_VERSION) latest)
|
||||
|
@ -51,3 +29,6 @@ make-redirects-for-checking:
|
|||
get-link-checker:
|
||||
rm -Rf $(HTMLTEST_DIR)/bin
|
||||
curl https://htmltest.wjdp.uk | bash -s -- -b $(HTMLTEST_DIR)/bin
|
||||
|
||||
clean:
|
||||
rm -rf $(HTMLTEST_DIR) public/* resources
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
[build]
|
||||
publish = "public"
|
||||
command = "make production-build"
|
||||
command = "npm run build:preview"
|
||||
|
||||
[context.deploy-preview]
|
||||
command = "make preview-build"
|
||||
|
||||
[context.branch-deploy]
|
||||
command = "make preview-build"
|
||||
[context.production]
|
||||
command = "npm run build:production"
|
||||
|
|
Loading…
Reference in New Issue