mkdir -p -- "$_DATA/pages/$page/"
# Macros expect to find page directory as working dir
( cd -- "$_DATA/pages/$page/";
- md <"$mdfile" |tee -- "${cache}.$$"
+ sed -E '1,20{ /^%[a-z]+/d; }' "$mdfile" \
+ | md |tee -- "${cache}.$$"
)
- mv -- "${cache}.$$" "${cache}"
+ grep -q '^%nocache' "$mdfile" \
+ && rm -- "${cache}.$$" \
+ || mv -- "${cache}.$$" "${cache}"
fi
}
/"[.]"/*)
FILE "${_EXEC}/${PATH_INFO#/\[.\]}"
;;
+ */\[*\]/) :;;
*/)
theme_page "${PATH_INFO}"
+ exit 0
;;
*/"[login]")
- [ "$USER_NAME" ] \
- && REDIRECT "./" \
- || theme_login
+ theme_login
+ exit 0
;;
*/"[register]")
theme_register
+ exit 0
;;
*/"#"*)
: # TODO: Invalid page name