blog-site

git clone git://git.lin.moe/blog-site.git

 1# https://taskfile.dev
 2
 3version: '3'
 4
 5vars:
 6  PUBLIC: youki:/srv/http/blog/
 7
 8tasks:
 9  new:article:
10    - 'printf "Title: " && read TITLE && hugo new "article/$(date +%Y)/$(date +%m)/${TITLE/ /_}.org"'
11  new:tutorial:
12    - 'printf "Title: " && read TITLE && hugo new "tutorial/$(date +%Y)/${TITLE/ /_}.org"'
13
14  serve: 
15    cmds: 
16    - hugo serve
17
18  build: 
19    cmds:
20    - hugo
21
22  publish:
23    deps: [build]
24    cmds:
25    - defer: rm -rf public
26    - rsync ./public/ {{.PUBLIC}} -rP
27