-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yml
More file actions
92 lines (79 loc) · 2.45 KB
/
Copy pathTaskfile.yml
File metadata and controls
92 lines (79 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
version: "3"
tasks:
build:
cmds:
- hugo
- hugo --config hugo-slides.toml
start_server:
# watch: true
# sources:
# - 'content/**/*.md'
cmds:
- hugo server -D --buildFuture
start_slides:
# watch: true
# sources:
# - 'content/**/*.md'
cmds:
- hugo server -D --buildFuture --config hugo-slides.toml
new_post:
cmds:
- new_post "{{.CLI_ARGS}}"
# new_talk:
# cmds:
# - hugo new --kind talk-bundle talks/{{.TALK_NAME}}
generate:og:
cmds:
- ls content/posts/ | parallel 'mkdir -p content/posts/{}/images && tcardgen -c scripts/og/config.yaml --template=scripts/og/template.png -f scripts/og/fonts/ content/posts/{}/index.md -o content/posts/{}/images/cover.png'
export:slides:
cmds:
- ./scripts/export-slides.sh
slidev:dev:
cmds:
- |
deck=$(find presentations -maxdepth 1 -mindepth 1 -type d -name '*-slidev' -printf '%f\n' | sort | gum choose)
cd "presentations/$deck"
pnpm dev
slidev:publish:
cmds:
- |
deck=$(find presentations -maxdepth 1 -mindepth 1 -type d -name '*-slidev' -printf '%f\n' | sort | gum choose)
cd "presentations/$deck"
if jq -e '.scripts["build:hugo"]' package.json >/dev/null 2>&1; then
pnpm build:hugo
else
echo "No build:hugo script for $deck" >&2
exit 1
fi
slidev:export:
cmds:
- |
deck=$(find presentations -maxdepth 1 -mindepth 1 -type d -name '*-slidev' -printf '%f\n' | sort | gum choose)
cd "presentations/$deck"
if jq -e '.scripts.export' package.json >/dev/null 2>&1; then
pnpm export
else
echo "No export script for $deck" >&2
exit 1
fi
reveal:dev:
cmds:
- |
deck=$(find presentations -maxdepth 1 -mindepth 1 -type d -name '*-reveal' -printf '%f\n' | sort | gum choose)
cd "presentations/$deck"
if jq -e '.scripts.dev' package.json >/dev/null 2>&1; then
pnpm dev
else
python3 -m http.server 3031
fi
reveal:publish:
cmds:
- |
deck=$(find presentations -maxdepth 1 -mindepth 1 -type d -name '*-reveal' -printf '%f\n' | sort | gum choose)
cd "presentations/$deck"
if jq -e '.scripts["build:hugo"]' package.json >/dev/null 2>&1; then
pnpm build:hugo
else
echo "No build:hugo script for $deck" >&2
exit 1
fi