diff --git a/.gitignore b/.gitignore index 4406794..2db89b9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,10 +3,9 @@ Thumbs.db _site/ .sass-cache/ -favicon.ico +src/favicon.ico -db.json *.log node_modules/ -public/ +_site/ .deploy*/ diff --git a/Makefile b/Makefile index be6739a..f16b4f4 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,23 @@ -public: favicon.ico source - npx hexo generate - cp -r node_modules/mathjax/es5 public/mathjax - cp favicon.ico public/ +_site: src/favicon.ico src/js/mathjax + cobalt build -favicon.ico: favicon.svg +src/js/mathjax: package-lock.json + cp -r node_modules/mathjax/es5 src/js/mathjax + +src/favicon.ico: favicon.svg rsvg-convert -w 16 -h 16 --background-color=none favicon.svg -o favicon-16.png rsvg-convert -w 32 -h 32 --background-color=none favicon.svg -o favicon-32.png rsvg-convert -w 64 -h 64 --background-color=none favicon.svg -o favicon-64.png convert favicon-16.png favicon-32.png favicon-64.png favicon.ico rm favicon*.png + mv favicon.ico src/ deploy: public rsync -avh public/* natronics.org:/var/www clean: - rm -rf public + rm -rf _site + rm -f src/favicon.ico + rm -rf src/js/mathjax -.PHONY: deploy clean +.PHONY: _site deploy clean diff --git a/src/js/.gitignore b/src/js/.gitignore new file mode 100644 index 0000000..144f5e4 --- /dev/null +++ b/src/js/.gitignore @@ -0,0 +1,2 @@ +# Installed from node_modules, not checked in +mathjax \ No newline at end of file