forked from machow/quartodoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (38 loc) · 1.53 KB
/
Makefile
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
EXAMPLE_INTERLINKS=quartodoc/tests/example_interlinks
README.md: README.qmd
quarto render $<
# These 2 rules are used to generate the example_interlinks folder,
# which contains a full example for the interlinks filter to be tested
$(EXAMPLE_INTERLINKS): scripts/filter-spec/generate_files.py
python3 $<
$(EXAMPLE_INTERLINKS)/test.qmd: scripts/filter-spec/generate_test_qmd.py
python3 $<
$(EXAMPLE_INTERLINKS)/test.md: $(EXAMPLE_INTERLINKS)/test.qmd _extensions/interlinks/interlinks.lua
cd $(EXAMPLE_INTERLINKS) && quarto render test.qmd --to gfm
examples/%/_site: examples/%/_quarto.yml
cd examples/$* \
&& quarto add --no-prompt ../.. \
&& quarto add --no-prompt quarto-ext/shinylive
cd examples/$* && quartodoc build --config _quarto.yml --verbose
cd examples/$* && quartodoc interlinks
quarto render $(dir $<)
docs/examples/%: examples/%/_site
rm -rf docs/examples/$*
cp -rv $< $@
docs-build-examples: docs/examples/single-page docs/examples/pkgdown docs/examples/auto-package
docs-build-readme: export BUILDING_README = 1
docs-build-readme:
# note that the input file is named GITHUB.qmd, because quart does not
# render files named README.qmd, and it is very cumbersome to work around
# this very strange behavior
cd docs \
&& quarto render GITHUB.qmd \
--to gfm \
--output README.md \
--output-dir ..
docs-build: docs-build-examples
cd docs && quarto add --no-prompt ..
cd docs && quartodoc build
cd docs && quartodoc interlinks
quarto render docs
test-interlinks: quartodoc/tests/example_interlinks/test.md