Trio Icon
Trio v6.1.0

The Trio Blog

  1. Latest
  2. Releases
  3. News
  4. Tutorials

Trio v2.0.0: The One With Collections

Collections are a big deal!

Collections are groups of pages that are dynamically generated by Trio that you would otherwise have to manually create yourself.

As an example, let's imagine that you have a team website which includes a page that lists all the team members. Information about each team member is maintained in a file named root/source/data/team.json. You would now like to create a detail page for every team member and render those pages when someone clicks on one of the team members in the list.

Without collections, you would have to manually create one fragment for each team member's detail page. If there are only a few team members that wouldn't be too difficult. But suppose there are dozens of team members! Having to manually create and maintain all those fragments would quickly become a burden.

That's where collections come to the rescue; they do all the "heavy lifting" for you. You only need to create one fragment, and one collection filter function that returns a collection dataset, and Trio will create a "clone" of that fragment for every member of the team.

Read the doc page to learn more about collections.

Enhancements To The CLI

Changes have been made to the CLI to reduce output to a minimum. In v1, Trio displayed numerous detailed metrics when building your project. This information was mostly for development and QA purposes, but made monitoring your build status somewhat tedious. Beginning with v2, Trio will now only display the total elapsed time it took to build your project by default. You can use the -m option when you want to display all the detailed metrics for your builds or when submitting issues.

In addition to the reduction of metrics displayed by default, Trio now also surrounds the output from each build with rows of asterisk to provide a visual separation between each build.

You can now run b -I as a shortcut for b -iws.

Other Changes

Trio no longer appends "-map" to the output css map file name. This was cruft left over from when Buster was still appending its hash to file names, which it no longer does as it now prepends the file name with the hash.

The trio.manifest.json file is no longer compressed.

You are no longer required to include the .html file extension in the fragment's front matter template property.

Major Bug Fixes

Fixed - Failed to convert front matter excerpts that were coded in markdown to html.

Fixed - CSS source maps were pointing to the wrong Sass source files.

Big And Small Changes To gettriossg.com

There's a new home page, which more succinctly expresses what Trio is all about, and the documentation has received numerous corrections, and enhancements to make it more accurate and easier to read.

Upgrading From v1 to v2

The schema for the cache has changed for v2.0.0, and is incompatible with prior versions. Therefore, if you are upgrading your projects from v1 to v2, you will have to regenerate your project's cache, which you can do by running the following build command in the terminal:

$ trio build | b

Changelog

Please see the changelog for details.

Your Financial Support Of This Project Is Greatly Appreciated

Trio is an open source project and is therefore free of charge to use both for noncommercial and commercial use, but when you use Trio to create a new website, please consider donating a few bucks. It doesn't take very long, the process is secure, and it will allow us to continue to support the community and to maintain and enhance Trio going forward.

Show your ❤️, add your ★ to the Github repo.