git/build.sh

39 lines
619 B
Bash
Raw Permalink Normal View History

2024-02-28 14:15:36 +00:00
#! /usr/bin/env bash
FILE="$(realpath "${BASH_SOURCE[0]}")"
ROOT="$(dirname "${FILE}")"
2024-02-29 15:11:19 +00:00
INPUT="${ROOT}/in"
2024-02-29 15:13:59 +00:00
INPUTS="${ROOT}/in.txt"
2024-10-13 21:01:06 +00:00
OUTPUT="${ROOT}/out/web"
2024-02-28 14:15:36 +00:00
2024-02-29 15:13:59 +00:00
function main {
local file
local files=()
2024-02-28 14:39:27 +00:00
rm --force --recursive "${OUTPUT}"
2024-02-28 14:15:36 +00:00
mkdir --parents "${OUTPUT}"
2024-02-29 15:13:59 +00:00
for file in $(cat "${INPUTS}") ; do
2024-02-29 15:14:23 +00:00
files+=("${INPUT}/${file}.md")
2024-02-29 15:11:19 +00:00
done
2024-02-28 14:15:36 +00:00
pandoc \
2024-02-28 14:39:27 +00:00
--verbose \
2024-02-28 14:15:36 +00:00
--standalone \
--self-contained \
2024-02-28 18:51:28 +00:00
\
2024-02-28 19:05:50 +00:00
--css "${ROOT}/index.css" \
2024-02-28 14:15:36 +00:00
--output "${OUTPUT}/index.html" \
2024-02-28 18:51:28 +00:00
\
--number-sections \
2024-02-28 19:45:41 +00:00
--slide-level '3' \
2024-02-28 14:15:36 +00:00
--write 'revealjs' \
2024-02-28 18:51:28 +00:00
--variable slideNumber \
2024-02-29 15:11:19 +00:00
\
2024-02-29 15:13:59 +00:00
"${files[@]}"
2024-03-22 15:17:28 +00:00
#--variable revealjs-url='/sw/revealjs/up' \
2024-02-29 15:13:59 +00:00
}
main