|
@@ -66,13 +66,13 @@ boh_build() {
|
|
|
mkdir $destination_dir
|
|
|
type boh_pre_build &> /dev/null && { boh_pre_build; }
|
|
|
# extra "/" is used to increment the final count by 1
|
|
|
- trim_at=`echo "/"$source_dir | fold -w 1 | grep -c /`
|
|
|
+ cut_at=`echo "/"$source_dir | fold -w 1 | grep -c /`
|
|
|
for file in `find $source_dir -type f -name "*.md"`; do
|
|
|
layout="default"
|
|
|
title=`echo $file | rev | cut -d / -f 1 | rev | sed s/.md//`
|
|
|
# sed removes the yaml frontmatter
|
|
|
body=`cat $file | sed '1{/^---/{:a N;/\n---/!ba;d}}' | markdown`
|
|
|
- newpath="$destination_dir/"`echo $file | rev | cut -d . -f 2 | rev | cut -d / -f $trim_at-`".html"
|
|
|
+ newpath="$destination_dir/"`echo $file | rev | cut -d . -f 2 | rev | cut -d / -f $cut_at-`".html"
|
|
|
frontmatter=`parse_frontmatter $file`
|
|
|
if [ "$frontmatter" ];then
|
|
|
eval $frontmatter
|