Fragments
The content. A Markdown or HTML file with its settings at the top inside an HTML comment, naming the template it belongs in.
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.
The name fits. Every page Trio built was put together from three kinds of file, plus JavaScript where a page needed something dynamic.
The content. A Markdown or HTML file with its settings at the top inside an HTML comment, naming the template it belongs in.
The page shell. Ordinary HTML with an element marked data-trio-fragment, which is where the fragment's content goes.
The shared pieces, like a header or a footer, pulled into a template with data-trio-include="footer.html".
gettriossg.com was Trio's home. The documentation for version 6 lived here, and the README in the GitHub repository still sends people to it, as does Trio's entry on jamstack.org's list of generators.
Those links deserve to land somewhere honest. Trio's last release was 6.1.0 in May 2021, so this page sums up what it was, points to the code that is still public, and covers the questions people arriving here usually have: 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 |
|---|---|
| Author | Jeffrey Schwartz, as 4awpawz |
| First published | 22 December 2018 |
| Last release | 6.1.0, 28 May 2021 |
| Licence | MIT for the code, CC BY 3.0 for the docs |
| Runs on | Node.js. The 6.0.4 changelog moved it to Node 14 LTS. |
| Built on | cheerio, marked, gray-matter, Dart Sass, PostCSS, BrowserSync, chokidar |
Dates are from the npm registry. Notes are from Trio's own changelog.
Version 0.0.1 of @4awpawz/trio is published.
Integrity checking, incremental builds, tag based JavaScript callbacks, and a scaffolded starter project with trio new -s.
One fragment can generate a whole set of pages from a filter module, which is how blog listings were paginated.
Full control over where blog pages land, and incremental builds that also watch trio.json.
Meaningful default values for site metadata, and a source/lib folder for modules your callbacks need.
Node Sass is replaced by Dart Sass and every dependency is updated.
Cache busting moves out of trio release into its own trio cachebust command.
BrowserSync watches the build folder and reloads the browser, and picks a free port if 3000 is taken.
Fragments, templates, includes and the plain JavaScript callbacks that replaced a template language.
Eleventy, Astro, Next.js, Hugo and the rest, compared honestly, and when to skip the generator.
Any static host will do. Or hand the folder to Claude or ChatGPT and let it go live on Clay.
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