diff --git a/.theme_version b/.theme_version new file mode 100644 index 0000000..20eb690 --- /dev/null +++ b/.theme_version @@ -0,0 +1 @@ +846b1c4 diff --git a/Makefile b/Makefile index e6ab762..5be1294 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,22 @@ +cat := $(if $(filter $(OS),Windows_NT),type,cat) +THEME_VERSION=$(shell $(cat) .theme_version) + install-theme: ## Install theme git clone git@github.com:biaslab/hugo-academic-group.git ./themes/academic-group; -update-theme: ## update theme - cd ./themes/academic-group; git pull + cd ./themes/academic-group && git checkout $(THEME_VERSION) +set-theme: ## Set theme + cd ./themes/academic-group && git checkout $(THEME_VERSION) +update-theme: ## Update theme to the latest version + cd ./themes/academic-group && git pull origin master + cd ./themes/academic-group && git checkout master + cd ./themes/academic-group && git rev-parse --short HEAD > ../../.theme_version +show-theme-version: ## Show theme version + @echo $(THEME_VERSION) build-website: ## Build website hugo -t academic-group -preview-website: ## Preview website +preview-website: set-theme ## Preview website hugo server -t academic-group -w -publish: ## Publish website +publish: set-theme ## Publish website ./publish.sh rebuild-docs: ## Build docs ./rebuild_docs.sh