_blogs and _pages: Better information
This commit is contained in:
parent
d91081c948
commit
feacf88ffa
14
qsgen2
14
qsgen2
@ -112,8 +112,8 @@ fi
|
|||||||
# We define the variable 'engine' based on what's in the 'config' file.
|
# We define the variable 'engine' based on what's in the 'config' file.
|
||||||
if [[ ${generator} == "native" ]]; then
|
if [[ ${generator} == "native" ]]; then
|
||||||
# Usage: ${engine} ${1} - Where 1 is the file you want to convert
|
# Usage: ${engine} ${1} - Where 1 is the file you want to convert
|
||||||
engine=_html
|
engine=_zhtml
|
||||||
export file_ext=tpl
|
export file_ext="tpl"
|
||||||
elif [[ ${generator} == "markdown" ]]; then
|
elif [[ ${generator} == "markdown" ]]; then
|
||||||
if [[ ! -f /usr/local/bin/pandoc ]]; then
|
if [[ ! -f /usr/local/bin/pandoc ]]; then
|
||||||
_msg other "Please install Pandoc."
|
_msg other "Please install Pandoc."
|
||||||
@ -122,11 +122,11 @@ elif [[ ${generator} == "markdown" ]]; then
|
|||||||
else
|
else
|
||||||
# Usage: ${engine} ${1} - Where 1 is the file you want parsed
|
# Usage: ${engine} ${1} - Where 1 is the file you want parsed
|
||||||
engine=/usr/local/bin/pandoc
|
engine=/usr/local/bin/pandoc
|
||||||
export file_ext=md
|
export file_ext="md"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (${debug}) _msg debug "Using the ${generator} engine for files: ${file_ext}"
|
if (${debug}); then _msg debug "Using the ${generator} engine for files: ${file_ext}"; fi
|
||||||
|
|
||||||
# Define cache files for blogs and pages
|
# Define cache files for blogs and pages
|
||||||
blog_cache_file="${project_dir}/.blog_cache"
|
blog_cache_file="${project_dir}/.blog_cache"
|
||||||
@ -364,7 +364,7 @@ function _pages() {
|
|||||||
pages_tpl="$(<${pages})"
|
pages_tpl="$(<${pages})"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_msg std "Generating Page: ${pages_in_array}"
|
_msg std "Generating Page: ${pages_in_array:l%.*}.html"
|
||||||
# Read the file once
|
# Read the file once
|
||||||
if (${debug}) _msg debug "_pages: Loading page_content once - ${pages_in_array}"
|
if (${debug}) _msg debug "_pages: Loading page_content once - ${pages_in_array}"
|
||||||
local page_content="$(<${pages_in_array})"
|
local page_content="$(<${pages_in_array})"
|
||||||
@ -429,7 +429,7 @@ function _pages() {
|
|||||||
local pages_tpl=$( _cleanup "${pages_tpl}" )
|
local pages_tpl=$( _cleanup "${pages_tpl}" )
|
||||||
|
|
||||||
# Write pages_tpl to disk
|
# Write pages_tpl to disk
|
||||||
_msg std "Writing ${www_root}/${pages_title_lower%.*}.html to disk."
|
# _msg std "Writing ${www_root}/${pages_title_lower%.*}.html to disk."
|
||||||
echo "${pages_tpl}" > ${www_root}/${pages_title_lower%.*}.html
|
echo "${pages_tpl}" > ${www_root}/${pages_title_lower%.*}.html
|
||||||
|
|
||||||
done
|
done
|
||||||
@ -503,7 +503,7 @@ function _blogs() {
|
|||||||
|
|
||||||
if (${debug}) _msg debug "_blogs: Processing ${blog}"
|
if (${debug}) _msg debug "_blogs: Processing ${blog}"
|
||||||
|
|
||||||
_msg std "Generating blog ${blog_index}.html"
|
_msg std "Generating Blog: ${blog_index}.html"
|
||||||
|
|
||||||
# Prepare the blog template
|
# Prepare the blog template
|
||||||
if (${debug}) _msg debug "_blogs: Processing substitutes in ${blog}"
|
if (${debug}) _msg debug "_blogs: Processing substitutes in ${blog}"
|
||||||
|
Loading…
Reference in New Issue
Block a user