Skip to content

Commit 6c695a2

Browse files
committed
feat: task for adding a vouch
1 parent 1acf05a commit 6c695a2

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

Taskfile.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,16 @@ tasks:
1414
- |
1515
{{.HUGO}} serve -D -E -F {{if .TERMUX}}--noBuildLock{{end}} --bind=127.0.0.1 --baseURL=http://127.0.0.1:1313
1616
17+
clean:
18+
desc: Clean the page build folder.
19+
cmds:
20+
- |
21+
rm -r ./public
22+
1723
build:
1824
desc: Create a production build of the site in ./public.
25+
deps:
26+
- clean
1927
cmds:
2028
- |
2129
{{.HUGO}} --minify {{if .TERMUX}}--noBuildLock{{end}}
@@ -128,7 +136,20 @@ tasks:
128136
rename="${path//$current/$now}"
129137
echo $rename
130138
mv "$path" "$rename" || true
131-
139+
140+
add-vouch:
141+
desc: Adds a new vouch to human.json.
142+
vars:
143+
PAGE: '{{.CLI_ARGS}}'
144+
FILE: 'data/vouches.yaml'
145+
cmds:
146+
- |
147+
cat >> {{.FILE}} <<EOF
148+
- url: {{.PAGE}}
149+
date: "{{.TODAY}}"
150+
EOF
151+
echo {{.FILE}}
152+
132153
update-mods:
133154
desc: Updates all submodules.
134155
cmds:

0 commit comments

Comments
 (0)