Beta 3 is out
The third beta release of Toucan is now ready try. New pipelines, queries, iterators and more.
Updated core
Toucan’s core has received a major update to improve scalability and type safety. It was really important for us laying down solid foundation for our future plans.
In addition, plenty of new features have just been released — lets highlight a few we`ve been working on. 🧑💻
Pipelines
In a nutshell, a pipeline tells Toucan what to generate, how and to where. With this, you have way more control over your site generation process. It is easy to define custom queries, introduce new date formats, iterators, or transformers. Different flows can be separated into multiple pipelines, what makes the definitions clear. A good example is the api
pipeline for this site, which creates a json
file from posts to enable searching.
id: api
queries:
posts:
contentType: post
orderBy:
- key: publication
direction: desc
contentTypes:
include:
- api
engine:
id: json
output:
path: "api"
file: posts
ext: json
Queries
Queries give extra flexibility how you access your content in a unified format. You can define them on the content definition itself or on your pipelines. They are strictly for a single content type, but limit, offset, filtering by key and ordering are also available. Narrowing down your content is super easy with them, such as featured posts:
featured:
contentType: post
filter:
key: featured
operator: equals
value: true
orderBy:
- key: publication
direction: desc
Iterators
Pagination did not fit well in content definitions, so they just got their new place on the pipelines. They become special queries now, which will be executed an resolved when a content with the same name was found as its identifier: {{iteratorId}}
.
iterators:
post.pagination:
contentType: post
limit: 12
orderBy:
- key: publication
direction: desc
If you are interested in more details check the Beta 3 migration guide or the changes if this release on GitHub. Real world examples are also available such as this site or our Minimal Example.
Have fun with Toucan Beta 3 and let us know what you think!
Related articles
Beta 3 migration guide
Migration guide for Toucan Beta 3: covering changes to content structure, theme changes and rendering features.
Beta 2 is now available
The second beta release of Toucan is now available. This release includes many improvements and some new features.
First beta release
Toucan 1.0.0-beta.1 has been released, featuring custom block directives and other minor enhancements.
Last alpha release
Toucan 1.0.0-alpha.3 is now released, this article will help you to understand the changes and to migrate your site from alpha 2.