You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-07-16 19:14:20 +02:00
Move pandoc/
folder out of the way (#1704)
The config fragments there are only used in the GitHub actions, so we can stash them way in the `.github/` folder.
This commit is contained in:
4
.github/pandoc/README.md
vendored
Normal file
4
.github/pandoc/README.md
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# Config Overrides for `mdbook-pandoc`
|
||||
|
||||
The configuration file fragments here are used to override the configuration in
|
||||
`book.toml`. See `.github/workflows/build.sh` for details.
|
4
.github/pandoc/ja.yaml
vendored
Normal file
4
.github/pandoc/ja.yaml
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
variables:
|
||||
CJKmainfont: "Noto Serif CJK JP"
|
||||
CJKsansfont: "Noto Sans CJK JP"
|
||||
CJKmonofont: "Noto Sans Mono CJK JP"
|
4
.github/pandoc/ko.yaml
vendored
Normal file
4
.github/pandoc/ko.yaml
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
variables:
|
||||
CJKmainfont: "Noto Serif CJK KR"
|
||||
CJKsansfont: "Noto Sans CJK KR"
|
||||
CJKmonofont: "Noto Sans Mono CJK KR"
|
4
.github/pandoc/zh-CN.yaml
vendored
Normal file
4
.github/pandoc/zh-CN.yaml
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
variables:
|
||||
CJKmainfont: "Noto Serif CJK SC"
|
||||
CJKsansfont: "Noto Sans CJK SC"
|
||||
CJKmonofont: "Noto Sans Mono CJK SC"
|
4
.github/pandoc/zh-TW.yaml
vendored
Normal file
4
.github/pandoc/zh-TW.yaml
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
variables:
|
||||
CJKmainfont: "Noto Serif CJK TC"
|
||||
CJKsansfont: "Noto Sans CJK TC"
|
||||
CJKmonofont: "Noto Sans Mono CJK TC"
|
8
.github/workflows/build.sh
vendored
8
.github/workflows/build.sh
vendored
@ -31,11 +31,15 @@ else
|
||||
export MDBOOK_OUTPUT__HTML__REDIRECT='{}'
|
||||
|
||||
# Include language-specific Pandoc configuration
|
||||
[ -f "pandoc/$book_lang.yaml" ] && export MDBOOK_OUTPUT__PANDOC__PROFILE__PDF__DEFAULTS="pandoc/$book_lang.yaml"
|
||||
if [ -f ".github/pandoc/$book_lang.yaml" ]; then
|
||||
export MDBOOK_OUTPUT__PANDOC__PROFILE__PDF__DEFAULTS=".github/pandoc/$book_lang.yaml"
|
||||
fi
|
||||
fi
|
||||
|
||||
mdbook build -d "$dest_dir"
|
||||
[ -f "$dest_dir/pandoc/pdf/comprehensive-rust.pdf" ] && mv "$dest_dir/pandoc/pdf/comprehensive-rust.pdf" "$dest_dir/html/"
|
||||
if [ -f "$dest_dir/pandoc/pdf/comprehensive-rust.pdf" ]; then
|
||||
mv "$dest_dir/pandoc/pdf/comprehensive-rust.pdf" "$dest_dir/html/"
|
||||
fi
|
||||
(cd "$dest_dir/exerciser" && zip --recurse-paths ../html/comprehensive-rust-exercises.zip comprehensive-rust-exercises/)
|
||||
|
||||
echo "::endgroup::"
|
||||
|
Reference in New Issue
Block a user