diff options
author | EuAndreh <eu@euandre.org> | 2021-10-02 21:43:12 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-10-02 21:43:15 -0300 |
commit | ffbdc7325c7271ab816dc3c1327f6efe67858f1f (patch) | |
tree | 964ab2a10a8dc96b3b28acb7a0d0ca9ef68665b7 /aux/workflow/commonmark.sh | |
parent | Makefile: Generate src/locale/en.sh for translation (diff) | |
download | git-permalink-ffbdc7325c7271ab816dc3c1327f6efe67858f1f.tar.gz git-permalink-ffbdc7325c7271ab816dc3c1327f6efe67858f1f.tar.xz |
aux/workflow/: Add <link rel="alternate" for translated CommonMark pages
Implements #task-43e9d7dd-987a-2f71-629f-28a4cc69be1e.
Diffstat (limited to '')
-rwxr-xr-x | aux/workflow/commonmark.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/aux/workflow/commonmark.sh b/aux/workflow/commonmark.sh index 39aacb4..088d447 100755 --- a/aux/workflow/commonmark.sh +++ b/aux/workflow/commonmark.sh @@ -1,7 +1,7 @@ #!/bin/sh set -eu -while getopts 'N:t:l:' flag; do +while getopts 'N:t:l:H:' flag; do case "$flag" in N) PROJECT_UC="$OPTARG" @@ -12,6 +12,9 @@ while getopts 'N:t:l:' flag; do l) THE_LANG="$OPTARG" ;; + H) + ALTERNATES="$OPTARG" + ;; *) exit 2 ;; @@ -29,6 +32,7 @@ assert_arg() { assert_arg "${PROJECT_UC:-}" '-N PROJECT_UC' assert_arg "${TITLE:-}" '-t TITLE' assert_arg "${THE_LANG:-}" '-l THE_LANG' +assert_arg "${ALTERNATES:-}" '-H ALTERNATES' pandoc \ --toc \ @@ -40,4 +44,5 @@ pandoc \ -r commonmark \ -w html \ -H aux/workflow/favicon.html \ - -H aux/workflow/style.css + -H aux/workflow/style.css \ + -H "$ALTERNATES" |