-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yaml
46 lines (43 loc) · 1.24 KB
/
Taskfile.yaml
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
version: '3'
vars:
# If you run bare environment or activated venv, set '' (blank string)
RUN_PYTHON: 'uv run'
SPHINX_DEFAULT_BUILD: 'dirhtml'
SPHINX_SOURCE_DIR: 'contents'
SPHINX_OUTPUT_DIR: 'build'
SPHINX_OPTIONS: ''
SPHINX_LANGUAGES:
- 'ja'
env:
SPHINXINTL_TRANSLATOR: "Kazuya Takei <[email protected]>"
tasks:
intl:
desc: 'Sync i18n environment'
dir: '{{.TASKFILE_DIR}}'
cmds:
- '{{.RUN_PYTHON}} sphinx-build -M gettext {{.SPHINX_SOURCE_DIR}} {{.SPHINX_OUTPUT_DIR}} {{.SPHINX_OPTIONS}}'
- '{{.RUN_PYTHON}} sphinx-intl update --language={{.SPHINX_LANGUAGES | join ","}}'
dev:
desc: 'Run docs server'
dir: '{{.TASKFILE_DIR}}'
cmds:
- '{{.RUN_PYTHON}} sphinx-autobuild -b dirhtml {{.SPHINX_SOURCE_DIR}} {{.SPHINX_OUTPUT_DIR}}/dirhtml'
build-*:
desc: 'Make docs'
dir: '{{.TASKFILE_DIR}}'
vars:
TARGET: '{{index .MATCH 0}}'
cmds:
- '{{.RUN_PYTHON}} sphinx-build -M {{.TARGET}} {{.SPHINX_SOURCE_DIR}} {{.SPHINX_OUTPUT_DIR}}'
build:
desc: 'Make docs (default target)'
deps:
- 'build-{{.SPHINX_DEFAULT_BUILD}}'
help:
desc: 'Display help of docs'
deps:
- 'build-help'
clean:
desc: 'Clean build files of docs'
deps:
- 'build-clean'