Archived
1
0
Fork 0

Add support for setting a directory to publish to

This commit is contained in:
Siina Mashek 2024-02-17 16:14:45 +02:00
parent 4a07ca6cb5
commit a8bfa8de77
2 changed files with 10 additions and 1 deletions

View file

@ -6,6 +6,7 @@ lastupdated="true"
site_title="koutsie's telenotes" site_title="koutsie's telenotes"
site_description="thoughts about mainly computers... maybe recipes and cats too?" site_description="thoughts about mainly computers... maybe recipes and cats too?"
site_link="https://k0.tel/" site_link="https://k0.tel/"
publish_dir="."
# Put CSS between <<EOF and EOF # Put CSS between <<EOF and EOF
site_css=$(cat <<EOF site_css=$(cat <<EOF

View file

@ -133,8 +133,16 @@ generate_rss_feed() {
# godspeed notecount... # godspeed notecount...
notecount=$(find notes -name "*.txt" ! -empty | wc -l) notecount=$(find notes -name "*.txt" ! -empty | wc -l)
if [[ ! -e $publish_dir ]]; then
mkdir $publish_dir
elif [[ ! -d $publish_dir ]]; then
echo "$dir already exists but is not a directory" 1>&2
exit
fi
# Create HTML file # Create HTML file
output_file="index.html" output_file="$publish_dir/index.html"
echo "<!DOCTYPE html> echo "<!DOCTYPE html>
<html> <html>
<head> <head>