#!/usr/bin/env bash # Adds all the bells and whistles to format the html page # Every blog post is marked with a and # which is parsed afterwards in the other functions. There is also a marker # to determine just the beginning of the text body of the post # # $1 a file with the body of the content # $2 the output file # $3 "yes" if we want to generate the index.html, # "no" to insert new blog posts # $4 title for the html header # $5 original blog timestamp # $6 post author declare body_begin_file declare date_inpost declare date_locale declare date_format declare date_format_timestamp declare global_url declare body_end_file create_html_page() { content=$1 filename=$2 index=$3 title=$4 timestamp=$5 author=$6 # Create the actual blog post # html, head { cat ".header.html" echo "
's on the title because of markdown conversion title=${title//
/} title=${title//<\/p>/} echo "$title" echo '