From 3aea44014574efbb1fc7a2696ee1ee74c40fa95f Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Sat, 27 Feb 2021 03:32:13 -0700 Subject: Add script to get header and footer for ssg --- .local/bin/sshf | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 .local/bin/sshf (limited to '.local/bin/sshf') diff --git a/.local/bin/sshf b/.local/bin/sshf new file mode 100755 index 0000000..85a0055 --- /dev/null +++ b/.local/bin/sshf @@ -0,0 +1,13 @@ +#!/bin/sh + +# Get the _header.html and _footer.html required for ssg from an already defined html. +main() { + in_file="${1:-$HOME/dox/www/luevano.xyz/luevano/index.html}" + out_folder="${2:-$HOME/dow/www/blog/src/}" + + sed '/<\/header/q' $in_file > $out_folder/_header.html + # Not proud of this, lol. + tac $in_file | sed '/