@@ -18,29 +18,42 @@ include .github/build/Makefile.show-help.mk
1818# ----------------------------------------------------------------------------
1919# Academy
2020# ---------------------------------------------------------------------------
21- .PHONY : setup build site clean check-go theme-update
22-
2321# # ------------------------------------------------------------
2422----LOCAL_BUILDS : Show help for available targets
2523
2624# # Local: Install site dependencies
2725setup :
28- npm i
26+ npm install
27+
28+ # # Local: Build and run site locally with draft and future content enabled.
29+ site : check-go
30+ hugo server -D -F
2931
3032# # Local: Build site for local consumption
3133build :
3234 hugo build
3335
34- # # Local: Build and run site locally with draft and future content enabled.
35- site : check-go
36- hugo server -D -F
37-
36+ # # Build site for local consumption
37+ build-preview :
38+ hugo --baseURL= $( BASEURL )
39+
3840# # Empty build cache and run on your local machine.
3941clean :
4042 hugo --cleanDestinationDir
4143 make setup
4244 make site
4345
46+ # # Fix Markdown linting issues
47+ lint-fix :
48+ @echo " Checking for markdownlint-cli2..."
49+ @command -v markdownlint-cli2 > /dev/null || { \
50+ echo " markdownlint-cli2 not found. Attempting to install globally..." ; \
51+ command -v npm > /dev/null || { echo " npm is not installed. Please install Node.js/npm and re-run 'make lint-fix'." ; exit 1; }; \
52+ npm install -g markdownlint-cli2; \
53+ }
54+ @echo " Running markdownlint-cli2 --fix..."
55+ @markdownlint-cli2 --fix " **/*.md" " #node_modules" " #public" " #resources"
56+
4457# # ------------------------------------------------------------
4558----MAINTENANCE : Show help for available targets
4659
@@ -53,3 +66,5 @@ check-go:
5366theme-update :
5467 echo " Updating to latest academy-theme..." && \
5568 hugo mod get github.com/layer5io/academy-theme
69+
70+ .PHONY : setup build build-preview site clean lint-fix check-go theme-update
0 commit comments