about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xgen2
-rw-r--r--shell.nix1
-rwxr-xr-xssg513
-rw-r--r--wpisy/_header.html2
4 files changed, 9 insertions, 9 deletions
diff --git a/gen b/gen
index b788c0a..0082afa 100755
--- a/gen
+++ b/gen
@@ -16,4 +16,4 @@ for f in `find wpisy/kronika/20* -name '*.md' | sort -r`; do
 done
 echo "</div>" >> wpisy/kronika.html
 
-./ssg5 wpisy dest "19pdh" "https://19.niedzwiedzinski.cyou"
+./ssg5 wpisy dest "19 PDH Puszcza" "https://19.niedzwiedzinski.cyou"
diff --git a/shell.nix b/shell.nix
index 49f5fd9..7a853f4 100644
--- a/shell.nix
+++ b/shell.nix
@@ -2,5 +2,6 @@
 pkgs.mkShell {
   buildInputs = with pkgs; [
     lowdown
+    httplz
   ];
 }
diff --git a/ssg5 b/ssg5
index bd58726..fa5bd4c 100755
--- a/ssg5
+++ b/ssg5
@@ -197,13 +197,12 @@ render_md_files_lowdown() {
       out="$2/${f%\.md}/index.html"
     fi
 
-    if [ "$(echo $f | cut -d'/' -f 2)" = "kronika" ]; then
-      echo "<article>" > $in && \
-      lowdown --html-no-skiphtml --html-no-escapehtml "$1/$f" >> $in && \
-      echo "</article>" >> $in
-    else
-      lowdown --html-no-skiphtml --html-no-escapehtml "$1/$f" > $in
-    fi
+    echo "" > $in
+    [ "$(echo $f | cut -d'/' -f 2)" = "kronika" ] && echo "<article>" > $in
+    # Filter out frontmatter
+    tail -n +$(($(sed -n '/---/,/---/p' $1/$f | wc -l)+2)) $1/$f | \
+      lowdown --html-no-skiphtml --html-no-escapehtml >> $in && \
+    [ "$(echo $f | cut -d'/' -f 2)" = "kronika" ] && echo "</article>" >> $in
 
     cat "$in" |
       render_html_file "$3" \
diff --git a/wpisy/_header.html b/wpisy/_header.html
index 075ce32..0bc7f8a 100644
--- a/wpisy/_header.html
+++ b/wpisy/_header.html
@@ -1,7 +1,7 @@
 <!doctype html>
 <html lang="en" prefix="og: http://ogp.me/ns#">
   <head>
-    <title>19 PDH Puszcza</title>
+    <title></title>
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width,initial-scale=1">
     <meta name="robots" content="all">