Quick partial implementation of Apache's server-parsed HTML as a static converter to regular HTML. You thus need to manually run the converter whenever the input/data changes.
npm install -g @edemaine/shtml2html
shtml2html filename.shtml # produces filename.html
shtml2html *.shtml # produces *.html
<!--#include file="path"-->
includes a non-relative path<!--#include virtual="path"-->
includes a relative path- Note: absolute paths are currently relative to the filesystem root. TODO: way to specify document root.
<!--#include virtual="path1" virtual="path2"-->
for multiple inclusions<!--#flastmod file="path"-->
: modified date of non-relative path (viatimefmt
)<!--#flastmod virtual="path"-->
: modified date of relative path (viatimefmt
)<!--#fsize file="path"-->
: size of non-relative path (viasizefmt
)<!--#fsize virtual="path"-->
: size of relative path (viasizefmt
)<!--#config key="value"-->
wherekey
is among:echomsg
: message for unsupported#echo
errormsg
: error to include in the file when a directive fails (a more descriptive error message should also be printed to console)sizefmt
: format for#fsize
, either "bytes" (default) or "abbrev"timefmt
: strftime format forLAST_MODIFIED
<!--#echo var="value"-->
wherevalue
is among:DOCUMENT_NAME
: name of.html
output (not.shtml
input)LAST_MODIFIED
: modified date of.shtml
input (viatimefmt
)
<!--#comment ...-->
gets removed