From 31f457fb4f3ca8826c50775101813f069d0eb7b0 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 2 Sep 2022 13:23:11 -0300 Subject: v2/src/bin/extract: Include preamble when extracting --- v2/src/bin/extract | 2 ++ v2/src/development/dynmake.sh | 3 ++- v2/src/development/genhtml.sh | 5 ----- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'v2') diff --git a/v2/src/bin/extract b/v2/src/bin/extract index a086264..7bbcba7 100755 --- a/v2/src/bin/extract +++ b/v2/src/bin/extract @@ -81,6 +81,8 @@ eval "$(assert-arg "$TYPE" '-t TYPE')" case "$TYPE" in content) + . "${FILENAME%.md}.entry-env" + printf '%s\n' "$PREAMBLE" awk ' separator >= 2 /^---$/ { separator++ } diff --git a/v2/src/development/dynmake.sh b/v2/src/development/dynmake.sh index 033cbc3..126c211 100755 --- a/v2/src/development/dynmake.sh +++ b/v2/src/development/dynmake.sh @@ -74,5 +74,6 @@ printf 'pastebins.md = \\\n' pastebins | varlist printf '\n' -pastebins | sed 's/^\(.*\)\.md$/\1.html: \1.entry-content/' pastebins | sed 's/^\(.*\)\.md$/\1.html: \1.entry-env/' +pastebins | sed 's/^\(.*\)\.md$/\1.html: \1.entry-content/' +pastebins | sed 's/^\(.*\)\.md$/\1.entry-content: \1.entry-env/' diff --git a/v2/src/development/genhtml.sh b/v2/src/development/genhtml.sh index f1ccf43..4c10703 100755 --- a/v2/src/development/genhtml.sh +++ b/v2/src/development/genhtml.sh @@ -105,10 +105,6 @@ slugify_once() { fi } -add_preamble() { - printf '%s\n%s\n' "$PREAMBLE" "$(cat -)" -} - markdown_to_html() { md2html } @@ -204,7 +200,6 @@ add_headings_anchors() { emit_body() { cat "${FILENAME%.md}.entry-content" | - add_preamble | markdown_to_html | extract_plaintext_snippets | add_line_numbers | -- cgit v1.2.3