Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@edemaine/shtml2html

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@edemaine/shtml2html

Convert Apache server-side rendered HTML to static HTML

  • 0.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

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/shtml2html

Usage

shtml2html filename.shtml    # produces filename.html
shtml2html *.shtml           # produces *.html

Supported 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 (via timefmt)
  • <!--#flastmod virtual="path"-->: modified date of relative path (via timefmt)
  • <!--#fsize file="path"-->: size of non-relative path (via sizefmt)
  • <!--#fsize virtual="path"-->: size of relative path (via sizefmt)
  • <!--#config key="value"--> where key 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 for LAST_MODIFIED
  • <!--#echo var="value"--> where value is among:
    • DOCUMENT_NAME: name of .html output (not .shtml input)
    • LAST_MODIFIED: modified date of .shtml input (via timefmt)
  • <!--#comment ...--> gets removed

FAQs

Package last updated on 02 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc