File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed
Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change 1- serve :
1+ HUGO_DEV_PORT = 1313
2+ HUGO_HOMEPAGE = $(shell hugo config --format json \
3+ | jq --raw-output '.baseurl' \
4+ | sed 's|https://\([^/]\+\) /|http://127.0.0.1/|' \
5+ | sed 's|127.0.0.1|127.0.0.1:$(HUGO_DEV_PORT ) |')
6+ HUGO_SERVER_OPTS = --noHTTPCache --buildDrafts --renderToMemory
7+
8+ .PHONY : theme
9+ theme :
10+ git submodule update --init --recursive
11+
12+ serve : theme
213 hugo --quiet version
3- (sleep 1 ; xdg-open http://localhost:1313/blog) > /dev/null 2>&1 &
4- hugo server --noHTTPCache --buildDrafts
14+ (sleep 1 ; xdg-open $( HUGO_HOMEPAGE) ) > /dev/null 2>&1 &
15+ hugo server $(HUGO_SERVER_OPTS )
16+
17+ .PHONY : PRINT-MACROS
18+ PRINT-MACROS :
19+ @make --print-data-base \
20+ | grep -A1 " ^# makefile" \
21+ | grep -v " ^#\|^--" \
22+ | sort
You can’t perform that action at this time.
0 commit comments