diff --git a/.gitignore b/.gitignore index 412a09c..c524348 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ **/themes/ +demo/ diff --git a/Makefile b/Makefile index f5387cf..4b501ba 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,8 @@ LESS_FILE = style.less CSS_DIR = ./static/css CSS_FILE = style.min.css CSS_TMP_FILE = tmp.css -current_dir = $(shell pwd) -.PHONY: clean build +.PHONY: clean demo build build: clean lessc $(LESS_DIR)/$(LESS_FILE) > $(CSS_DIR)/$(CSS_TMP_FILE) @@ -13,18 +12,11 @@ build: clean rm -f $(CSS_DIR)/$(CSS_TMP_FILE) demo: build - mkdir -p exampleSite/themes/coder - mkdir -p exampleSite/themes/coder/archetypes - mkdir -p exampleSite/themes/coder/images - mkdir -p exampleSite/themes/coder/layouts - 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 + mkdir -p demo/themes/coder + rsync -av exampleSite/* demo + rsync -av --exclude='demo' --exclude='exampleSite' --exclude='.git' . demo/themes/coder + cd demo && hugo serve -D clean: rm -f $(CSS_DIR)/*.css - rm -rf exampleSite/themes/coder + rm -rf demo