support for .php files

This commit is contained in:
Jaromil 2016-01-05 20:20:08 +01:00
parent 92a781b027
commit 6e6fdfa21a
2 changed files with 20 additions and 4 deletions

View File

@ -24,6 +24,8 @@ files found into a directory.
Webnomad is operated from the console terminal.
The following dependencies must be installed: `zsh pandoc inotifywait`
## BASIC USAGE
First create a directory for your website, then place the webnomad

22
render
View File

@ -435,14 +435,15 @@ for t in $txts; do
cp $t ${destination}/$txt
done
# render all HTML views
htmls=(`find views -type f -name '*.html'`)
for src in $htmls; do
publish_html() {
src="$1"
ext=${2:-.html}
# read meta commands
cat ${src} | read_meta
dst=`calc_dest "$src"`
dst=`calc_dest "$src" $ext`
[[ "$FLOWTYPE" = "" ]] || includecss+=(flowtype.css)
@ -484,8 +485,21 @@ EOF
act "done"
}
# render all HTML views
htmls=(`find views -type f -name '*.html'`)
for src in $htmls; do
publish_html $src
done
# render PHP files the same way
phps=(`find views -type f -name '*.php'`)
for src in $phps; do
publish_html $src .php
done
# render all image galleries
source $SYS/gallery