" >> tmp/content.textile
for i in ../content/*; do
# if folder if not sys if not modele
if [ -d "$i" ] && [[ ! "$i" =~ "model" ]]; then
# if readme exists
if [ -f "$i/publi.textile" ]; then
# user name
# record readme content on variable
# cont=$(cat "$i/publi.textile")
echo "$i"
u=${i/..\//}
# record link for menu
# echo "$u" >> tmp/summary
u=${u/content//}
id=${u:2}
echo "* \"$id\":#$id" >> tmp/summary
# right html and contents on main tmp/content.textile
echo "" >> tmp/content.textile
# add user content to main content
echo ""$'\n' >> tmp/content.textile
# get meta data
# add content to main tmp/content.textile
cat "$i/publi.textile" >> tmp/content.textile
echo $'\n'"" >> tmp/content.textile
# get folder name
folder=$(basename "$i")
echo "
" >> tmp/content.textile
echo '' >> tmp/content.textile
fi
fi
done
# end main section
echo "" >> tmp/content.textile
# _ _
# | | | |
# | |__ ___ __ _ __| | ___ _ __
# | '_ \ / _ \/ _` |/ _` |/ _ \ '__|
# | | | | __/ (_| | (_| | __/ |
# |_| |_|\___|\__,_|\__,_|\___|_|
echo "header"
touch tmp/header
echo "" >> tmp/header
cat tmp/header|cat - tmp/content.textile > tmp/out && mv tmp/out tmp/content.textile
echo "Pandoc"
pandoc -s \
-f textile \
-t html5 -o ./index.html \
-H style.tpl.html \
-A script.tpl.html \
tmp/content.textile
# -H css/main.css \