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 --- bb.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bb.sh') 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