-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
77 lines (66 loc) · 1.71 KB
/
Taskfile.yml
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
version: '3'
tasks:
default:
desc: Default task - starts Jekyll server
deps: [install]
cmds:
- task: serve
clear:
desc: Clear the terminal screen
cmds:
- cmd: clear
platforms: [linux, darwin]
- cmd: cls
platforms: [windows]
install:
desc: Install dependencies
cmds:
- gem install bundler
- bundle install
serve:
desc: Start Jekyll server
cmds:
- bundle exec jekyll serve
build:
desc: Build the site
cmds:
- bundle exec jekyll build
clean:
desc: Clean build files
cmds:
- bundle exec jekyll clean
update:
desc: Update dependencies
cmds:
- bundle update
lint:
desc: Lint markdown files and front matter
deps: [lint:pull]
cmds:
- docker run -v "${PWD}:/workdir" --rm -w /workdir davidanson/markdownlint-cli2 "_posts/**/*.md" "*.md"
- docker run -v "${PWD}:/workdir" --rm -w /workdir cytopia/yamllint .
lint:pull:
desc: Pull required Docker images
cmds:
- docker pull pandoc/core:latest
status:
- docker image inspect pandoc/core:latest >/dev/null 2>&1
lint:check:
desc: Check markdown formatting
deps: [lint:pull]
cmds:
- |
for file in _posts/*.md; do
docker run --rm -v ${PWD}:/work -w /work pandoc/core:latest \
pandoc "$file" -f markdown -t markdown --check
done
lint:fix:
desc: Attempt to fix markdown issues automatically
cmds:
- |
echo "Starting lint:fix task..."
docker run --rm \
-v "/home/russell/dev/blog:/workdir" \
-w /workdir \
davidanson/markdownlint-cli2 \
--fix "_posts/**/*.md" "_drafts/**/*.md"