lb

A fully-featured RSS and blog site generator in less than 100 lines of shell script
Log | Files | Refs | README | LICENSE

commit 90d68993a09afa729ea731a823ce03ecb2d2ab8a
parent 64e9c95b62316ec3e99f5df34b677599f7b012cf
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Tue, 16 Jul 2019 10:31:51 -0400

Merge pull request #22 from chrissxYT/patch-1

Fixed issue #21
Diffstat:
Mlb | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lb b/lb @@ -38,7 +38,7 @@ publish() { \ htaccessentry=$(grep "$basefile" "$webdir/blog/.htaccess") realname="$(echo "$htaccessentry" | cut -d'"' -f2)" rssdate="$(grep "$basefile" blog/.htaccess | sed "s/.*\.html\"* *#*//g" | tr -d '\n')" - [ -z "$rssdate" ] && rssdate="$(date '+%a, %d %b %Y %H:%M:%S %z')" # RSS date formats must comply with standards to validate. + [ -z "$rssdate" ] && rssdate="$(LC_TIME=en_US date '+%a, %d %b %Y %H:%M:%S %z')" # RSS date formats must comply with standards to validate. webdate="$(date '+%a, %d %b %Y %H:%M:%S %z')" # But this visible date you can set to any format. tmpdir=$(mktemp -d) printf "<html>\\n<head>\\n<title>%s</title>\\n<link rel='stylesheet' type='text/css' href='%s'>\\n<meta charset='utf-8'/>\\n</head>\\n<body>\\n<h1>%s</h1>\\n<small>[<a href='%s#%s'>link</a>&mdash;<a href='%s'>standalone</a>]</small>\\n%s\\n<footer>by <strong><a href='%s'>%s</a></strong></footer>\\n</body>\\n\\n</html>" "$realname" "$css" "$realname" "../$blogfile" "$base" "$basefile" "$(cat "$webdir/blog/.drafts/$basefile")" "$website" "$name" > "$webdir/blog/$basefile"