From 137a1d412f7fc09448674fc77d7d8116eeff3b63 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Thu, 1 Jul 2021 23:43:32 +0200 Subject: init --- deploy.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 deploy.sh (limited to 'deploy.sh') diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..b655079 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +mkdir -p dest + +cp logo.png style.css dest + +cat _index_header.html > dest/index.html +for f in $(find itemy -name '*.md'); do + file=$(basename $f .md) + title=$(grep '^# ' $f | head -n 1 | cut -c 3-) + echo "
  • $title
  • " >> dest/index.html + cat _header.html > dest/$file.html + sed 's/^# \(.*\)/

    \1<\/h2>/' $f >> dest/$file.html + echo " + + " >> dest/$file.html +done + +echo " + +" >> dest/index.html -- cgit 1.4.1