Skip to content

Commit 99cc69d

Browse files
committed
ah keep-md for mmd; rm in post-render
1 parent 853f4ab commit 99cc69d

File tree

4 files changed

+26
-13
lines changed

4 files changed

+26
-13
lines changed

.github/workflows/render_book.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@ jobs:
1717
- name: Check out repository
1818
uses: actions/checkout@v4
1919

20+
- name: Install librsvg
21+
# convert svg to png for pdf
22+
run: brew install librsvg
23+
# run: sudo apt-get install librsvg2-bin # librsvg2-dev
24+
2025
- name: Install Quarto
2126
uses: quarto-dev/quarto-actions/setup@v2
2227
# with:
2328
# tinytex: true # for pdf but buggy on finding version
2429

25-
- name: Install chromium for Quarto
26-
# for rendering Mermaid diagrams to pdf: https://quarto.org/docs/authoring/diagrams.html#chrome-install
27-
run: quarto install chromium
28-
2930
- name: Install TinyTeX
3031
uses: r-lib/actions/setup-tinytex@v2
3132

32-
- name: Install librsvg
33-
# convert svg to png for pdf
34-
run: brew install librsvg
35-
# run: sudo apt-get install librsvg2-bin # librsvg2-dev
33+
- name: Install chromium for Quarto
34+
# for rendering Mermaid diagrams to pdf: https://quarto.org/docs/authoring/diagrams.html#chrome-install
35+
run: quarto install chromium
3636

3737
# - name: Install qpdf
3838
# # to prevent R install from failing
@@ -43,7 +43,7 @@ jobs:
4343
# env:
4444
# HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: true
4545
# with:
46-
# r-version: '4.4.1' # 2024-09-04
46+
# r-version: '4.4.0' # 2024-09-04
4747

4848
- name: Install R dependencies
4949
uses: r-lib/actions/setup-r-dependencies@v2

_quarto.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
project:
22
type: book
3-
# pre-render: libs/pre-render.R
43
output-dir: _book
54
resources:
65
- "/.nojekyll"
6+
# pre-render:
7+
# - libs/pre-render.R
8+
post-render:
9+
- libs/post-render.R
710

811
editor:
912
mode: source
@@ -51,6 +54,7 @@ format:
5154
echo: false
5255
number-sections: true
5356
highlight-style: github
57+
keep-md: true # see libs/post-render.R
5458
pdf:
5559
documentclass: scrreprt
5660
# keep-tex: true # for debugging

libs/post-render.R

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# cleanup because we need this _quarto.yml directive for creating both docx and pdf:
2+
# keep-md: true
3+
# per [Supporting file are cleanup to soon when using multiformat](https://github.com/quarto-dev/quarto-cli/issues/8373#issuecomment-1979245883)
4+
5+
mds <- list.files(pattern = ".+\\.docx\\.md", recursive = T)
6+
unlink(mds)
7+
8+
dirs <- list.files(pattern = ".+_files|site_libs")
9+
unlink(dirs, recursive = TRUE)

portals.qmd

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ portals_csv <- here("data/portal_comparison.csv")
3232
3333
# Define the capability symbols and colors
3434
cap_symbols <- c(
35-
"none" = "\u2716", # ✖
36-
"partial" = "\u25B2", # ▲
37-
"full" = "\u2714") # ✔
35+
"none" = "✖", # "\u2716", # ✖
36+
"partial" = "▲", # "\u25B2", # ▲
37+
"full" = "✔") # "\u2714") # ✔
3838
cap_colors <- c(
3939
"none" = "#FFCCCC", # Light red
4040
"partial" = "#FFF2CC", # Light yellow

0 commit comments

Comments
 (0)