aboutsummaryrefslogtreecommitdiff
path: root/v2/src/development/genhtml.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-04-04 12:10:54 -0300
committerEuAndreh <eu@euandre.org>2023-04-04 12:10:54 -0300
commitbf4a390c23a860ff8bda9538942f2b16cdcf8c05 (patch)
treeddc45415eeb7e8908605745294f58647fd18f533 /v2/src/development/genhtml.sh
parentRevamp v2/ (diff)
downloadeuandre.org-bf4a390c23a860ff8bda9538942f2b16cdcf8c05.tar.gz
euandre.org-bf4a390c23a860ff8bda9538942f2b16cdcf8c05.tar.xz
Makefile: Add ShellCheck to "check" target
Diffstat (limited to 'v2/src/development/genhtml.sh')
-rwxr-xr-xv2/src/development/genhtml.sh93
1 files changed, 48 insertions, 45 deletions
diff --git a/v2/src/development/genhtml.sh b/v2/src/development/genhtml.sh
index cb8fd73..d816fe6 100755
--- a/v2/src/development/genhtml.sh
+++ b/v2/src/development/genhtml.sh
@@ -72,6 +72,7 @@ FILENAME="${1:-}"
eval "$(assert_arg "$FILENAME" 'FILENAME')"
+# shellcheck source=/dev/null
. "${FILENAME%.md}.conf"
#
@@ -185,14 +186,16 @@ add_headings_anchors() {
}
emit_body() {
- cat "${FILENAME%.md}.entry-content" |
+ < "${FILENAME%.md}.content" \
markdown_to_html |
extract_plaintext_snippets |
add_line_numbers |
add_headings_anchors
}
-
+if false; then
+ emit_body
+fi
@@ -202,22 +205,22 @@ emit_body() {
cat <<-EOF
<!DOCTYPE html>
- <html lang="$lang">
+ <html lang="${lang:?}">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
- <link rel="stylesheet" type="text/css" href="$style_url" />
- <link rel="icon" type="image/svg+xml" href="$favicon_url" />
+ <link rel="stylesheet" type="text/css" href="${style_url:?}" />
+ <link rel="icon" type="image/svg+xml" href="${favicon_url:?}" />
<title>$$title_html</title>
<meta name="author" content="EuAndreh" />
- <meta property="og:site_name" content="$site_name" />
- <meta property="og:locale" content="$lang" />
- <meta property="og:title" content="$title_html" />
+ <meta property="og:site_name" content="${site_name:?}" />
+ <meta property="og:locale" content="${lang:?}" />
+ <meta property="og:title" content="${title_html:?}" />
- <link rel="canonical" href="$url" />
- <meta property="og:url" content="$url" />
+ <link rel="canonical" href="${url:?}" />
+ <meta property="og:url" content="${url:?}" />
</head>
<body>
<header>
@@ -237,41 +240,41 @@ EOF
exit
-.md.rehtml:
- F="$<"; . "$${F%.md}.conf"; envsubst < src/lib/reamble."$$lang".html > $@
-
-.md.osthtml:
- F="$<"; . "$${F%.md}.conf"; envsubst < src/lib/ostamble."$$lang".html > $@
-
-
- <p class="post-footer">
- <a href="mailto:~euandreh/public-inbox@lists.sr.ht?Subject=Re%3A%20$URI_TITLE">Comment</a>
- and see
- <a href="https://lists.sr.ht/~euandreh/public-inbox?search=$URI_TITLE">existing discussions</a>
- |
- <a href="https://euandre.org/git/euandre.org/tree/$FILENAME">view source</a>
- </p>
- </article>
- </main>
- <footer>
- <hr />
- <ul>
- <li>
- <img class="svg-icon" src="$(url-for 'static/envelope.svg')" alt="a envelope icon representing an email address" />
- <a href="mailto:$email">$email</a>
- </li>
- <li>
- <img class="svg-icon" src="$(url-for 'static/lock.svg')" alt="a lock icon representing a GPG public key" />
- <a href="$(url-for 'static/public.asc.txt')">81F90EC3CD356060</a>
- </li>
- </ul>
- <p>
- The content for this site is licensed under <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>. The <a href="https://euandre.org/git/euandre.org">code</a> is <a rel="license" href="https://euandre.org/git/euandre.org/tree/COPYING">AGPLv3 or later</a>. Patches welcome.
- </p>
- </footer>
- </body>
- </html>
-EOF
+# .md.rehtml:
+# F="$<"; . "$${F%.md}.conf"; envsubst < src/lib/reamble."$$lang".html > $@
+#
+# .md.osthtml:
+# F="$<"; . "$${F%.md}.conf"; envsubst < src/lib/ostamble."$$lang".html > $@
+#
+#
+# <p class="post-footer">
+# <a href="mailto:~euandreh/public-inbox@lists.sr.ht?Subject=Re%3A%20$URI_TITLE">Comment</a>
+# and see
+# <a href="https://lists.sr.ht/~euandreh/public-inbox?search=$URI_TITLE">existing discussions</a>
+# |
+# <a href="https://euandre.org/git/euandre.org/tree/$FILENAME">view source</a>
+# </p>
+# </article>
+# </main>
+# <footer>
+# <hr />
+# <ul>
+# <li>
+# <img class="svg-icon" src="$(url-for 'static/envelope.svg')" alt="a envelope icon representing an email address" />
+# <a href="mailto:$email">$email</a>
+# </li>
+# <li>
+# <img class="svg-icon" src="$(url-for 'static/lock.svg')" alt="a lock icon representing a GPG public key" />
+# <a href="$(url-for 'static/public.asc.txt')">81F90EC3CD356060</a>
+# </li>
+# </ul>
+# <p>
+# The content for this site is licensed under <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>. The <a href="https://euandre.org/git/euandre.org">code</a> is <a rel="license" href="https://euandre.org/git/euandre.org/tree/COPYING">AGPLv3 or later</a>. Patches welcome.
+# </p>
+# </footer>
+# </body>
+# </html>
+# EOF
# FIXMEs:
# - feeds