Skip to content

center-key/dsi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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