aboutsummaryrefslogtreecommitdiff
path: root/aux/workflow/commonmark.sh
blob: e9609c2b046e6cf6423d0bf1f068c633337c0da8 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
set -eu

mkdir -p public

PROJECT_UC="$1"
F="$2"

pandoc --toc                                     \
       --highlight-style pygments                \
       --toc-depth=2                             \
        -s                                       \
        --metadata title="$PROJECT_UC - ${F%.*}" \
        --metadata lang=en                       \
        -r commonmark                            \
        -w html                                  \
        < "$F" > "public/${F%.*}.html"