Improve demo command
This commit is contained in:
parent
ccf50e5893
commit
c9d4c83faf
|
@ -1 +1,2 @@
|
||||||
**/themes/
|
**/themes/
|
||||||
|
demo/
|
||||||
|
|
20
Makefile
20
Makefile
|
@ -3,9 +3,8 @@ LESS_FILE = style.less
|
||||||
CSS_DIR = ./static/css
|
CSS_DIR = ./static/css
|
||||||
CSS_FILE = style.min.css
|
CSS_FILE = style.min.css
|
||||||
CSS_TMP_FILE = tmp.css
|
CSS_TMP_FILE = tmp.css
|
||||||
current_dir = $(shell pwd)
|
|
||||||
|
|
||||||
.PHONY: clean build
|
.PHONY: clean demo build
|
||||||
|
|
||||||
build: clean
|
build: clean
|
||||||
lessc $(LESS_DIR)/$(LESS_FILE) > $(CSS_DIR)/$(CSS_TMP_FILE)
|
lessc $(LESS_DIR)/$(LESS_FILE) > $(CSS_DIR)/$(CSS_TMP_FILE)
|
||||||
|
@ -13,18 +12,11 @@ build: clean
|
||||||
rm -f $(CSS_DIR)/$(CSS_TMP_FILE)
|
rm -f $(CSS_DIR)/$(CSS_TMP_FILE)
|
||||||
|
|
||||||
demo: build
|
demo: build
|
||||||
mkdir -p exampleSite/themes/coder
|
mkdir -p demo/themes/coder
|
||||||
mkdir -p exampleSite/themes/coder/archetypes
|
rsync -av exampleSite/* demo
|
||||||
mkdir -p exampleSite/themes/coder/images
|
rsync -av --exclude='demo' --exclude='exampleSite' --exclude='.git' . demo/themes/coder
|
||||||
mkdir -p exampleSite/themes/coder/layouts
|
cd demo && hugo serve -D
|
||||||
mkdir -p exampleSite/themes/coder/static
|
|
||||||
cp -r $(current_dir)/archetypes/* exampleSite/themes/coder/archetypes/
|
|
||||||
cp -r $(current_dir)/images/* exampleSite/themes/coder/images
|
|
||||||
cp -r $(current_dir)/layouts/* exampleSite/themes/coder/layouts
|
|
||||||
cp -r $(current_dir)/static/* exampleSite/themes/coder/static
|
|
||||||
cp -r $(current_dir)/theme.toml exampleSite/themes/coder/theme.toml
|
|
||||||
cd exampleSite && hugo serve -D
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(CSS_DIR)/*.css
|
rm -f $(CSS_DIR)/*.css
|
||||||
rm -rf exampleSite/themes/coder
|
rm -rf demo
|
||||||
|
|
Loading…
Reference in New Issue