Add Makefile to build CSS
2 files modified
1 files added
| | |
| | | # web files |
| | | [*.{html,css,less}] |
| | | indent_size = 2 |
| | | |
| | | [Makefile] |
| | | indent_style = tab |
| New file |
| | |
| | | LESS_DIR = ./static/less |
| | | LESS_FILE = style.less |
| | | CSS_DIR = ./static/css |
| | | CSS_FILE = style.min.css |
| | | CSS_TMP_FILE = tmp.css |
| | | |
| | | |
| | | .PHONY: clean build |
| | | |
| | | build: clean |
| | | lessc $(LESS_DIR)/$(LESS_FILE) > $(CSS_DIR)/$(CSS_TMP_FILE) |
| | | uglifycss $(CSS_DIR)/$(CSS_TMP_FILE) > $(CSS_DIR)/$(CSS_FILE) |
| | | rm -f $(CSS_DIR)/$(CSS_TMP_FILE) |
| | | |
| | | clean: |
| | | rm -f $(CSS_DIR)/*.css |
| | |
| | | |
| | | ### Build & Test |
| | | |
| | | To update or generate the minified CSS file: |
| | | |
| | | ``` |
| | | make build |
| | | ``` |
| | | |
| | | To build your site and test, run: |
| | | |
| | | ``` |
| | |
| | | ## Special Thanks |
| | | |
| | | - Gleen McComb, for his great [article](https://glennmccomb.com/articles/how-to-build-custom-hugo-pagination/) about custom pagination. |
| | | - All contributors, for every PR and Issue reported.\ |
| | | - All contributors, for every PR and Issue reported. |