@edemaine/shtml2html
v0.1.0
Published
Convert Apache server-side rendered HTML to static HTML
Readme
shtml2html
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.
Installation
npm install -g @edemaine/shtml2htmlUsage
shtml2html filename.shtml # produces filename.html
shtml2html *.shtml # produces *.htmlSupported Directives
<!--#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"-->wherekeyis among:echomsg: message for unsupported#echoerrormsg: 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"-->wherevalueis among:DOCUMENT_NAME: name of.htmloutput (not.shtmlinput)LAST_MODIFIED: modified date of.shtmlinput (viatimefmt)
<!--#comment ...-->gets removed
