#!/bin/bash
source "$WEBSITE_ROOT/common"
process_article() {
source "$1";
echo """
$TITLE
$AUTHOR
$DATE
$ARTICLE
""";
}
echo """HTTP/1.1 200 OK
Content-type: text/html
""";
cat "$WEBSITE_ROOT/static/head.html";
#readarray -td ',' data < <(get_prop 'VERSION,GUILDS');
#$WEBSITE_ROOT/support/sidebar 1;
sidebar;
echo "";
if [ -z $UNPUBLISHED ]; then
articles="$WEBSITE_ROOT/articles/published/"*'.meta'
else
articles="$WEBSITE_ROOT/articles/incoming/"*'.meta'
fi;
for article in $articles; do
process_article "$article";
done;
echo "";
cat "$WEBSITE_ROOT/static/tail.html";