add the new feed variable and handle it

master
Kavelach 2 years ago
parent da370b8adb
commit 428f81e0c4

@ -53,6 +53,7 @@ show_help() {
echo " variables:"
echo " BLOG_TITLE: Blog's title. By default used as <h1> on the home page, tabs title and in"
echo " SEO tags in various places. "
echo " BLOG_FEED_TITLE: Blog's title for feeds."
echo " BLOG_DESCRIPTION: Description of the blog. By default it is used in rss/atom feeds."
echo " DATE_FORMAT_INDEX: Optional. Article creation dates format that are on index pages."
echo " If omitted, %F is used."
@ -86,6 +87,7 @@ clean() {
. "$(path configs/default)"
export BLOG_TITLE
export BLOG_FEED_TITLE
export BLOG_DESCRIPTION
export BLOG_URL_ROOT

@ -1,4 +1,5 @@
BLOG_TITLE="My Blog"
BLOG_FEED_TITLE="Kavelach's blog feed"
BLOG_DESCRIPTION="My blog"
DATE_FORMAT_INDEX=%F

@ -33,6 +33,7 @@ get_tab_title() {
build() {
test -z "$BLOG_TITLE" && no_blog_title
test -z "$BLOG_FEED_TITLE" && no_blog_feed_title
test -z "$BLOG_DESCRIPTION" && no_blog_description
# Make the blog and data directories if missing

@ -101,6 +101,9 @@ notify_send_missing() {
no_blog_title() {
error "Blog title is not defined" 21
}
no_blog_feed_title() {
error "No title for blog feeds" 23
}
no_blog_description() {
error "Blog description is not defined" 22
}

@ -6,6 +6,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🗒</text></svg>">
<link rel="stylesheet" href="/style.css?v=$BUILD_DATE">
<link rel="alternate" type="application/rss+xml" title="$BLOG_FEED_TITLE - RSS" href="/rss.xml">
<link rel="alternate" type="application/atom+xml" title="$BLOG_FEED_TITLE - Atom" href="/atom.xml">
<title>$TITLE_TAB</title>
<meta property="og:title" content="$TITLE_SEO" />
<meta name="description" content="$DESC_SEO">

Loading…
Cancel
Save