mirror of https://github.com/dyne/webnomad.git
support for .php files
This commit is contained in:
parent
92a781b027
commit
6e6fdfa21a
|
|
@ -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
22
render
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue