From 0fc7058ae76f1eb97bd4d8f22e512e17600cdf7f Mon Sep 17 00:00:00 2001 From: Alexey Shpakovsky Date: Sat, 1 Mar 2014 16:22:28 +0100 Subject: [PATCH] make CSS generation optional --- bb.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bb.sh b/bb.sh index 0fdfb26..8a147e8 100755 --- a/bb.sh +++ b/bb.sh @@ -178,8 +178,9 @@ global_variables() { # extra content to add just after we open the tag # and before the actual blog content body_begin_file="" - # CSS files to include on every page - css_include=('main.css' 'blog.css') + # CSS files to include on every page, f.ex. css_include=('main.css' 'blog.css') + # leave empty to use generated + css_include=() # Localization and i18n # "Comments?" (used in twitter link after every post) @@ -846,6 +847,7 @@ delete_includes() { create_css() { # To avoid overwriting manual changes. However it is recommended that # this function is modified if the user changes the blog.css file + [ $css_include ] && return || css_include=('main.css' 'blog.css') if [[ ! -f "blog.css" ]]; then # blog.css directives will be loaded after main.css and thus will prevail echo '#title{font-size: x-large;} @@ -1023,8 +1025,8 @@ do_main() { [[ "$1" == "reset" ]] && reset && exit - create_includes create_css + create_includes [[ "$1" == "post" ]] && write_entry "$@" [[ "$1" == "rebuild" ]] && rebuild_all_entries [[ "$1" == "delete" ]] && rm "$2" &> /dev/null