XStatic—Smart Static Site Generator

A smart, static site generator that automatically manages dependencies to achieve blazing build times with minimal cognitive load. Only new and changed files, and files upstream of a changed dependency are processed. Renders markdown or embedded-Ruby (Erb-like) content as HTML.

Supports templates (embedded & layout), which may be included within content sources or other templates. Document metadata may me added using a plain-text preamble of key-value pairs. Generates a complete website that can be served by the built-in WEBrick server.

Examples

Here’s an example command sequence to get a project up and running.

$ mkdir myproject
$ cd myproject

$ xstatic init                    # set up initial project files
$ find . -type f
./content/index.md                # markdown content & metadata
./content/default.css             # asset to be hard linked under ./site
./templates/layouts/default.erb   # layout template used to render index

$ xstatic site                    # build website under ./site
updated ./site/index              # markdown & metadata converted to HTML
$ find ./site
./site                            # complete static site ready to be served
./site/index                      # generated HTML file
./site/default.css                # hard linked asset

$ xstatic start                   # start WEBrick server on port 2000
$ xstatic stop                    # stop WEBrick server

The above sequence can be simplified to a single command:

$ xstatic init site start         # and you're ready to go!
Homepage

ecentryx.com/gems/xstatic

Ruby Gem

rubygems.org/gems/xstatic

History

  1. 2022-02-24, v0.1.0

    • First public release.

License

(ISC License)

Copyright © 2022, Clint Pachl <pachl@ecentryx.com>

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.