Skip to content

Latest commit

 

History

History
64 lines (53 loc) · 2.09 KB

README.md

File metadata and controls

64 lines (53 loc) · 2.09 KB

Design-Side Includes (DSI)

Command line tool to convert legacy SSI code into static HTML

License:MIT

SSI is a legacy templating format -- only use if you must.

Setup

  1. Install Homebrew and then install Java and Groovy:
    $ brew install openjdk groovy
  2. Verify installs:
    $ java --version
    $ groovy --version
  3. Run the commands:
    $ mkdir -p ~/apps/dsi
    $ cd ~/apps/dsi
    $ curl --remote-name https://raw.githubusercontent.com/center-key/dsi/main/dist/dsi.jar
    $ curl --remote-name https://raw.githubusercontent.com/center-key/dsi/main/dist/run.sh
    $ chmod +x ~/apps/dsi/run.sh

Verify your setup:

$ ~/apps/dsi/run.sh --version

Usage

Command format:

$ ~/apps/dsi/run.sh [SrcFolder] [Filename] [NewExt]

The parameters are optional.

Parameter Description Default Value
SrcFolder Specifies the location of the base HTML files and fragment HTML files. .
Filename The "file name" specifies the name of the base HTML file (ex: index.bhtml). Wildcards ("*") are supported if quoted. "*.bhtml"
NewExt The "new extension" specifies the file extension of the new files. .html
DestFolder Specifies the output location to save the resulting HTML files. .

Examples

Default command:

$ ~/apps/dsi/run.sh  #convert .bhtml files to .html

Command to generate .jsp files from src/*.bjsp and save them to the public_html folder:

$ ~/apps/dsi/run.sh src "*.bjsp" .jsp public_html

Page Tags

Supported page tags:

  • include
  • if
  • elif
  • else
  • endif
  • set
  • echo

See the Specification Suite in the spec folder for the syntax.


MIT License