From bf676017c4febd546134a0636909599fba21e6f2 Mon Sep 17 00:00:00 2001 From: Carlos Fenollosa Date: Sun, 1 Sep 2019 14:19:21 +0200 Subject: fixed head before sed --- bb.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bb.sh') diff --git a/bb.sh b/bb.sh index 69875d4..46c5aa2 100755 --- a/bb.sh +++ b/bb.sh @@ -341,9 +341,9 @@ twitter_card() { echo "" echo "" echo "" # Twitter truncates at 70 char - description=$(grep -v "^

$template_tags_line_header" "$1" | sed -e 's/<[^>]*>//g' | head -c 250 | tr '\n' ' ' | sed "s/\"/'/g") + description=$(grep -v "^

$template_tags_line_header" "$1" | sed -e 's/<[^>]*>//g' | tr '\n' ' ' | sed "s/\"/'/g" | head -c 250) echo "" - image=$(sed -n 's/.*" -- cgit v1.2.3 From c126913cddef0b7c400acc017b454984c41b466b Mon Sep 17 00:00:00 2001 From: Carlos Fenollosa Date: Sun, 10 May 2020 16:22:42 +0200 Subject: New feature: provides specific content ONLY on the index file --- README.md | 1 + bb.sh | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'bb.sh') diff --git a/README.md b/README.md index 60682f9..a0f760d 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,7 @@ As a guideline, pull requests should: Changelog --------- +- 2.9 Added `body_begin_file_index` - 2.8 Bugfixes
Slavic language support thanks to Tomasz Jadowski
Removed the now defunct Twitter JSON API share count
diff --git a/bb.sh b/bb.sh index 46c5aa2..c034922 100755 --- a/bb.sh +++ b/bb.sh @@ -17,7 +17,7 @@ global_config=".config" # by the 'global_config' file contents global_variables() { global_software_name="BashBlog" - global_software_version="2.8" + global_software_version="2.9" # Blog title global_title="My fancy blog" @@ -95,9 +95,11 @@ global_variables() { # extra content to add just after we open the tag # and before the actual blog content body_begin_file="" - # extra content to add just before we cloese ) + # extra content to add just before we close body_end_file="" + # extra content to ONLY on the index page AFTER `body_begin_file` contents + # and before the actual content + body_begin_file_index="" # CSS files to include on every page, f.ex. css_include=('main.css' 'blog.css') # leave empty to use generated css_include=() @@ -433,6 +435,7 @@ create_html_page() { echo "" # stuff to add before the actual body content [[ -n $body_begin_file ]] && cat "$body_begin_file" + [[ $filename = $index_file* ]] && [[ -n $body_begin_file_index ]] && cat "$body_begin_file_index" # body divs echo '

' echo '
' -- cgit v1.2.3 From adf76adaf15157641b807fcdb1e0662f615bec70 Mon Sep 17 00:00:00 2001 From: Carlos Fenollosa Date: Thu, 4 Nov 2021 19:39:11 +0100 Subject: Added support for configuring a Twitter Card default image --- bb.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'bb.sh') diff --git a/bb.sh b/bb.sh index c034922..ae142d3 100755 --- a/bb.sh +++ b/bb.sh @@ -49,6 +49,8 @@ global_variables() { # Change this to your username if you want to use twitter for comments global_twitter_username="" + # Default image for the Twitter cards. Use an absolute URL + global_twitter_card_image="" # Set this to false for a Twitter button with share count. The cookieless version # is just a link. global_twitter_cookieless="true" @@ -345,8 +347,17 @@ twitter_card() { echo "" # Twitter truncates at 70 char description=$(grep -v "^

$template_tags_line_header" "$1" | sed -e 's/<[^>]*>//g' | tr '\n' ' ' | sed "s/\"/'/g" | head -c 250) echo "" - image=$(sed -n '2,$ d; s/.*" } -- cgit v1.2.3 From 1715ee1d605e4619a377dcbd14e6c004d9db4402 Mon Sep 17 00:00:00 2001 From: Carlos Fenollosa Date: Thu, 4 Nov 2021 20:09:13 +0100 Subject: Bumped version to 2.10 --- README.md | 2 +- bb.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'bb.sh') diff --git a/README.md b/README.md index a0f760d..bf498a1 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ As a guideline, pull requests should: Changelog --------- - +- 2.10 Added `global_twitter_card_image` - 2.9 Added `body_begin_file_index` - 2.8 Bugfixes
Slavic language support thanks to Tomasz Jadowski
diff --git a/bb.sh b/bb.sh index ae142d3..9d8e645 100755 --- a/bb.sh +++ b/bb.sh @@ -17,7 +17,7 @@ global_config=".config" # by the 'global_config' file contents global_variables() { global_software_name="BashBlog" - global_software_version="2.9" + global_software_version="2.10" # Blog title global_title="My fancy blog" -- cgit v1.2.3