Add support for setting a directory to publish to
This commit is contained in:
parent
4a07ca6cb5
commit
a8bfa8de77
2 changed files with 10 additions and 1 deletions
|
@ -6,6 +6,7 @@ lastupdated="true"
|
|||
site_title="koutsie's telenotes"
|
||||
site_description="thoughts about mainly computers... maybe recipes and cats too?"
|
||||
site_link="https://k0.tel/"
|
||||
publish_dir="."
|
||||
|
||||
# Put CSS between <<EOF and EOF
|
||||
site_css=$(cat <<EOF
|
||||
|
|
10
noter.sh
10
noter.sh
|
@ -133,8 +133,16 @@ generate_rss_feed() {
|
|||
# godspeed notecount...
|
||||
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
|
||||
output_file="index.html"
|
||||
output_file="$publish_dir/index.html"
|
||||
echo "<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
|
Reference in a new issue