flowtype is now optional

This commit is contained in:
Jaromil 2014-09-10 15:52:13 +02:00
parent f06e81139d
commit 83d86f4afe
2 changed files with 9 additions and 5 deletions

5
init
View File

@ -81,10 +81,13 @@ EXTENSION=".html"
# leave blank if relative, or for instance /blog/
WEB_ROOT=""
# Uncomment for Flowtype
# FLOWTYPE=1
# What is the size ratio of text with respect to the width
# of its container element. This is better than setting the
# text size in an absolute way (we use Flowtype)
FONT_RATIO=30
# FONT_RATIO=30
EOF
}

9
render
View File

@ -163,8 +163,7 @@ EOF
# if test mode then render the test footer
{ test "$CMD" = "test" } && { render_test_footer }
# if there is flowtype.js then use it
{ test -r "$destination"/js/flowtype.js } && {
[[ "$FLOWTYPE" = "" ]] || { # if there is flowtype.js then use it
cat <<EOF
<script type="text/javascript">
@ -277,7 +276,8 @@ render_html() {
cat $tmp
# extra js for html pages
includejs+=(flowtype.js)
[[ "$FLOWTYPE" = "" ]] || {
includejs+=(flowtype.js) }
# clean up from temporary files
rm -f tmp.*
@ -375,7 +375,8 @@ for src in $htmls; do
dst=`calc_dest "$src"`
includecss+=(flowtype.css)
[[ "$FLOWTYPE" = "" ]] || {
includecss+=(flowtype.css) }
render_header > $dst