Trio SSG

Trio was a static site generator for Node.js. You gave it Markdown, HTML and a little plain JavaScript, and it gave you back a folder of finished pages.

Three parts, one page

The name fits. Every page Trio built was put together from three kinds of file, plus JavaScript where a page needed something dynamic.

Fragments

The content. A Markdown or HTML file with its settings at the top inside an HTML comment, naming the template it belongs in.

Templates

The page shell. Ordinary HTML with an element marked data-trio-fragment, which is where the fragment's content goes.

Includes

The shared pieces, like a header or a footer, pulled into a template with data-trio-include="footer.html".

npm i -g @4awpawz/trionpm i -g @4awpawz/trionpm i -g @4awpawz/trionpm i -g @4awpawz/trionpm i -g @4awpawz/trionpm i -g @4awpawz/trionpm i -g @4awpawz/trionpm i -g @4awpawz/trionpm i -g @4awpawz/trio

Where Trio stands now

gettriossg.com was Trio's home, where the documentation for version 6 lived. The code is still public on GitHub and the package is still on npm.

Trio's last release was 6.1.0 in May 2021, so this page sums up what it was, points to the code, and answers the two questions people ask about it now: which generator to use now, and how to get a built site online.

If you still have an old Trio project, the folder it built is a complete website on its own. You do not need Trio installed to host it.

Package@4awpawz/trio
AuthorJeffrey Schwartz, as 4awpawz
First published22 December 2018
Last release6.1.0, 28 May 2021
LicenceMIT for the code, CC BY 3.0 for the docs
Runs onNode.js. The 6.0.4 changelog moved it to Node 14 LTS.
Built oncheerio, marked, gray-matter, Dart Sass, PostCSS, BrowserSync, chokidar

Eight releases worth knowing

Dates are from the npm registry. Notes are from Trio's own changelog.

22 Dec2018

First on npm

Version 0.0.1 of @4awpawz/trio is published.

v0.0.1
26 Jul2019

The first stable release

Integrity checking, incremental builds, tag based JavaScript callbacks, and a scaffolded starter project with trio new -s.

v1.0.0
20 Nov2019

Collections

One fragment can generate a whole set of pages from a filter module, which is how blog listings were paginated.

v2.0.0
22 Jan2020

Permalinks

Full control over where blog pages land, and incremental builds that also watch trio.json.

v3.0.0
25 Jul2020

Sensible defaults

Meaningful default values for site metadata, and a source/lib folder for modules your callbacks need.

v4.0.0
22 Jan2021

Dart Sass

Node Sass is replaced by Dart Sass and every dependency is updated.

v5.0.0
29 Apr2021

Cache busting on its own

Cache busting moves out of trio release into its own trio cachebust command.

v6.0.0
28 May2021

The last release

BrowserSync watches the build folder and reloads the browser, and picks a free port if 3000 is taken.

v6.1.0

Put it online

A Trio build, an Eleventy build or pages an AI wrote for you: the folder is the website, and any static host will serve it.

How to host a static site
Hosted by Clay