danielmoch.com

Static site for www.danielmoch.com
git clone git://git.danielmoch.com/danielmoch.com.git
Log | Files | Refs | LICENSE

Makefile (1228B)


      1 # See LICENSE file for copyright and license details
      2 .POSIX:
      3 
      4 all: dag target/index.html target/posts/index.html target/sitemap.xml target/rss.xml
      5 
      6 target/posts/index.html: index.db templates/landing_header.html templates/landing_footer.html templates/nav.html
      7 	m4 -I templates templates/landing_header.html >$@
      8 	dagindex -Gohtml >>$@
      9 	cat templates/landing_footer.html >>$@
     10 
     11 target/index.html: templates/index.html templates/nav.html
     12 	dagindex -A -t "Home" -s "/" \
     13 		-p $$(stat -f%m templates/index.html) -x
     14 	mkdir -p target
     15 	m4 -I templates -DSLUG=https://www.danielmoch.com/ \
     16 		templates/index.html >$@
     17 
     18 target/sitemap.xml: index.db
     19 	dagindex -Gositemap -f https://www.danielmoch.com >$@
     20 
     21 target/rss.xml: index.db target/posts/index.html
     22 	dagindex -Gorss -t "Daniel Moch's Weblog" -f 'https://www.danielmoch.com' \
     23 		-d "Daniel Moch's Weblog" -r 'https://www.danielmoch.com/rss.xml' -l en \
     24 		-c 'Contents © 2021 Daniel Moch, CC BY-SA 4.0 License' >$@
     25 
     26 dag:
     27 	dag
     28 
     29 serve:
     30 	python3 -m http.server -d target -b 127.0.0.1 8000
     31 
     32 clean:
     33 	rm -rf target index.db
     34 
     35 deploy: all
     36 	openrsync --rsync-path=/usr/bin/openrsync -a --del target/ \
     37 		root@phosphorus.danielmoch.com:/var/www/htdocs/dotcom
     38 
     39 .PHONY: all clean dag serve deploy