From 7467a627372650131a1c1c9fc906e2cc68f15d04 Mon Sep 17 00:00:00 2001 From: holly sparkles Date: Sun, 24 Sep 2023 16:35:30 +0200 Subject: [PATCH] feat: add build script and sample config --- build.sh | 23 +++++++++++++++++++++++ config.json | 10 ++++++++++ 2 files changed, 33 insertions(+) create mode 100755 build.sh create mode 100644 config.json diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..9fd2640 --- /dev/null +++ b/build.sh @@ -0,0 +1,23 @@ +#!/bin/env zsh + +CURRENT_DIR=$(realpath $(dirname $0)) +LIVEJRNL_TEMPLATE_DIR="$CURRENT_DIR/templates/" +LIVEJRNL_OUTPUT_DIR="$CURRENT_DIR/build/" + +cd $CURRENT_DIR +cd livejrnl +# enter venv +source .venv/bin/activate + +# build the site and RSS feeds +python src/livejrnl.py -t $LIVEJRNL_TEMPLATE_DIR/deadjournal/index.html.template -o $LIVEJRNL_OUTPUT_DIR/index.html --config="$CURRENT_DIR/config.json" +python src/livejrnl.py -t $LIVEJRNL_TEMPLATE_DIR/shared/rss_feed.xml.template -o $LIVEJRNL_OUTPUT_DIR/feed.xml --config="$CURRENT_DIR/config.json" +python src/livejrnl.py -t $LIVEJRNL_TEMPLATE_DIR/shared/rss_feed.xml.template -o $LIVEJRNL_OUTPUT_DIR/feed_latest.xml --cutoff=5 --config="$CURRENT_DIR/config.json" + +# exit venv +deactivate + +cd $CURRENT_DIR +# build CSS +mkdir -p ./build/css/ +sassc -t compressed "$LIVEJRNL_TEMPLATE_DIR/deadjournal/scss/_stylesheet.scss" "$LIVEJRNL_OUTPUT_DIR/css/stylesheet.min.css" \ No newline at end of file diff --git a/config.json b/config.json new file mode 100644 index 0000000..eb1398f --- /dev/null +++ b/config.json @@ -0,0 +1,10 @@ +{ + "title": "Welcome to my LiveJrnl", + "base_url": "https://localhost", + "description": "Write a bit about your website here.", + "author": "Ashley Robin", + "author_link": "https://localhost/arobin", + "year": "2023", + "language": "en", + "rss_language": "en-gb" +} \ No newline at end of file -- libgit2 1.7.2