dates fixing

This commit is contained in:
Drew 2019-12-10 22:29:27 +00:00
parent fd3aeabcdb
commit 45a625f488
1 changed files with 6 additions and 25 deletions

31
blop
View File

@ -14,14 +14,13 @@ blogdir="$PWD" # Default behaviour is to act on the current working directory. Y
# default_author: Rebecca Black
# max_posts: 20
#
# Note that in `site.conf` the leading 'default_' is omitted and setting values are unquoted.
default_default_author="Drew"
default_max_posts="10" # number of posts to list on the blog index, posts beyond this will listed in archive.html. Set to "unlimited" (with quotes) to archive nothing
default_group_by_date=false # whether to group the main listing on the blog's index by dates
default_date_format="%B %-d, %Y"
default_short_date_format="%B, %Y" # format for date grouping in the archive and optionally on the index (see group_by_date above)
default_listing_format="<a href=\"posts/<!--title-nospaces-->.html\"><!--title--></a> by <!--author--> on <!--date-->" # rejig this and/or remove elements to taste. You may need to change delimeter when sed is used on this later if any of the fields contain slashes
default_author="Drew"
max_posts="10" # number of posts to list on the blog index, posts beyond this will listed in archive.html. Set to "unlimited" (with quotes) to archive nothing
group_by_date=false # whether to group the main listing on the blog's index by dates
date_format="%B %-d, %Y"
short_date_format="%B, %Y" # format for date grouping in the archive and optionally on the index (see group_by_date above)
listing_format="<a href=\"posts/<!--title-nospaces-->.html\"><!--title--></a> by <!--author--> on <!--date-->" # rejig this and/or remove elements to taste. You may need to change delimeter when sed is used on this later if any of the fields contain slashes
#######################
@ -49,24 +48,6 @@ if [[ -f "$blogdir/site.conf" ]]; then
listing_format=$(echo "$conf" | sed -n 's@^listing_format:\s\?\(.*\)$@\1@p')
fi
fi
if [[ -z "$default_author" ]]; then
default_author="$default_default_author"
fi
if [[ -z "$max_posts" ]]; then
max_posts="$default_max_posts"
fi
if [[ -z "$group_by_date" ]]; then
group_by_date="$default_group_by_date"
fi
if [[ -z "$date_format" ]]; then
date_format="$default_date_format"
fi
if [[ -z "$short_date_format" ]]; then
short_date_format="$default_short_date_format"
fi
if [[ -z "$listing_format" ]]; then
listing_format="$default_listing_format"
fi
do_error () {
if [[ ! -z "$1" ]]; then