Getting Started

Prerequisites, installing required modules, running your first build, and the project layout.

Prerequisites

  • The BoxLang runtime and CLI (boxlang on your PATH)
  • Three modules, managed via requirements.txt: bx-jsoup, [email protected], bx-yaml

Quick start

Clone and enter the repo:

bashgit clone https://github.com/robertz/boxlang-ssg.git
cd boxlang-ssg

Install the required modules with the helper script, which reads requirements.txt and installs what's missing:

bashboxlang setup.bx

Or install manually:

bashinstall-bx-module bx-jsoup [email protected] bx-yaml

Then build the site:

bashboxlang ssg.bx build

Generated files go to _site/ (configurable — see Configuration). You can serve _site/ with any static server. A simple router (router.bxs) is also copied into _site/ for BoxLang's mini server setups.

Commands

CommandWhat it does
boxlang ssg.bx buildBuilds the static site into the configured output folder.
boxlang ssg.bx listLists the discovered renderable documents.
boxlang ssg.bx helpShows available commands.

Project structure

PathWhat it is
ssg.bxCLI entry and build pipeline.
setup.bxInstalls modules listed in requirements.txt.
ssg-config.jsonBuild configuration (output dir, passthrough, ignore).
_includes/Layouts, views, and partials — layouts/main.bxm is the base HTML layout; page.bxm, post.bxm, sidebar.bxm are example views/partials.
_data/Optional global JSON data, loaded into collections.global.
posts/Example content (Markdown with front matter).
assets/Static assets (passthrough).
router.bxsSimple router included in output for dev serving.
index.bxmExample index page showing a posts list.
404.mdExample 404 page (layout: none).