minify css
This commit is contained in:
parent
093dd31a57
commit
2a97fbaafd
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,3 +3,4 @@ site
|
|||
NOTES.md
|
||||
|
||||
theme/*.html
|
||||
theme/*.min
|
||||
|
|
12
Makefile
12
Makefile
|
@ -1,5 +1,8 @@
|
|||
# $< : first dependency (input)
|
||||
# $@ : rule name (output)
|
||||
|
||||
# Build the website
|
||||
site/index.html: docs/** theme/** theme/main.html
|
||||
site/index.html: docs/** theme/** theme/main.html theme/style.css.min mkdocs.yml
|
||||
mkdocs build
|
||||
|
||||
theme/main.html: haml/main.haml
|
||||
|
@ -7,6 +10,9 @@ theme/main.html: haml/main.haml
|
|||
cat $@.tmp > $@
|
||||
rm $@.tmp
|
||||
|
||||
theme/style.css.min: theme/style.css
|
||||
python3 -m csscompressor -o $@ $<
|
||||
|
||||
# Serve the website at http://127.0.0.1:8000/~tasiaiso/
|
||||
serve: theme/main.html
|
||||
mkdocs serve -w theme
|
||||
|
@ -23,6 +29,10 @@ format-markdown:
|
|||
upload: site/index.html
|
||||
scp -r site/** tasiaiso@tilde.club:/home/tasiaiso/public_html
|
||||
|
||||
purge: clean format site/index.html
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -r site/
|
||||
rm theme/main.html
|
||||
rm theme/style.css.min
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
%link(rel="icon" type="image/x-icon" href="/~tasiaiso/favicon.ico")
|
||||
|
||||
%link(rel="stylesheet" href="/~tasiaiso/gruvbox-dark.css")
|
||||
%link(rel="stylesheet" href="/~tasiaiso/style.css")
|
||||
%link(rel="stylesheet" href="/~tasiaiso/style.css.min")
|
||||
|
||||
%title {% if page.title %}{{ page.title }} - {% endif %}{{ config.site_name }}
|
||||
|
||||
|
|
|
@ -6,13 +6,8 @@ theme:
|
|||
custom_dir: "theme/"
|
||||
|
||||
plugins:
|
||||
# - search
|
||||
- minify:
|
||||
minify_html: true
|
||||
minify_js: true
|
||||
minify_css: true
|
||||
htmlmin_opts:
|
||||
remove_comments: true
|
||||
cache_safe: true
|
||||
# css_files:
|
||||
# - style.css
|
||||
reduce_boolean_attributes: true
|
||||
|
|
Loading…
Reference in a new issue