cosin-website/Makefile

32 lines
646 B
Makefile
Raw Normal View History

2019-04-13 18:58:56 +02:00
# Hugo configuration.
HUGO_COMMAND := hugo
2022-04-01 14:17:04 +02:00
HUGO_OPTIONS := --printI18nWarnings --minify
2018-04-29 17:11:44 +02:00
2019-04-13 18:58:56 +02:00
OUTPUT_DIR := public
2018-04-29 17:11:44 +02:00
2019-04-13 18:58:56 +02:00
# Vnu validator configuration.
VNU_COMMAND := vnu
VNU_OPTIONS := --skip-non-html --also-check-css
2018-04-29 22:53:53 +02:00
2019-04-13 18:58:56 +02:00
# Non-file goals.
.PHONY: server generate validate upload clean
2018-04-29 17:11:44 +02:00
2019-04-13 18:58:56 +02:00
# Include the configuration files.
-include config.mk settings.mk
2018-04-29 17:11:44 +02:00
2019-04-13 18:58:56 +02:00
# Start a local development server.
2018-04-29 18:40:29 +02:00
server:
2019-04-13 18:58:56 +02:00
hugo $(HUGO_OPTIONS) server
# Generate static output files for deployment.
generate:
hugo $(HUGO_OPTIONS)
# Validate html and css in generated files.
validate: generate
$(VNU_COMMAND) $(VNU_OPTIONS) $(OUTPUT_DIR)
2018-04-29 18:40:29 +02:00
2019-04-13 18:58:56 +02:00
# Clean up.
2018-04-29 17:11:44 +02:00
clean:
rm -rf $(OUTPUT_DIR)