danielmoch.com

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

Dagfile (957B)


      1 target "target" {
      2 	source "src" {
      3 		extension .md {
      4 			suffix /index.html {
      5 				require "templates/post_header.html"
      6 				require "templates/post_footer.html"
      7 				require "templates/nav.html"
      8 				filter 'm4 -I templates -DDESCRIPTION="$(lowdown -Xdescription -Tterm $<)" -DPAGE_TITLE="$(lowdown -Xtitle -Tterm $<)" -DSLUG=https://www.danielmoch.com/$(echo $< | sed "s/^src\///;s/\.md//")/ $1 >$>'
      9 				filter "lowdown -Thtml $< >>$>"
     10 				filter "cat <$2 >>$>"
     11 				filter 'dagindex -A -a"$(lowdown -Xauthor -Tterm $<)" -c"$(lowdown -Xcategory -Tterm $<)" -d"$(lowdown -Xdescription -Tterm $<)" -p "$(lowdown -Xdate -Tterm $<)" -s $(echo $< | sed "s/^src\///;s/\.md//")/ -t "$(lowdown -Xtitle -Tterm $<)" -u $(stat -f%m $<)'
     12 			}
     13 			suffix .pdf {
     14 				filter "lowdown -sTms --nroff-no-numbered $< | 9 sed 's/\.AU /.AU\n/' | pdfroff -itk -mspdf >$>"
     15 			}
     16 		}
     17 		extension .scss {
     18 			suffix .css {
     19 				filter "sassc -t compressed $< $>"
     20 			}
     21 		}
     22 	}
     23 	source files
     24 }