aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-09-02 13:23:11 -0300
committerEuAndreh <eu@euandre.org>2022-09-02 13:23:11 -0300
commit31f457fb4f3ca8826c50775101813f069d0eb7b0 (patch)
treedd048be3a346eb0b417fc50a3956d0f02494af5b
parentv2/src/development/genhtml.sh: Get content from *.entry-content (diff)
downloadeuandre.org-31f457fb4f3ca8826c50775101813f069d0eb7b0.tar.gz
euandre.org-31f457fb4f3ca8826c50775101813f069d0eb7b0.tar.xz
v2/src/bin/extract: Include preamble when extracting
Diffstat (limited to '')
-rwxr-xr-xv2/src/bin/extract2
-rwxr-xr-xv2/src/development/dynmake.sh3
-rwxr-xr-xv2/src/development/genhtml.sh5
3 files changed, 4 insertions, 6 deletions
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 |