· 1 min read

Beta 4 is available


Better control over your assets and content. Improved API support.

Asset Properties

Asset Properties are a new way to inject your assets into the front matter. With different action types, you can choose to simply add or override file keys, load contents and store them directly in your front matter (e.g. an svg) or even parse other YAML files and attach its contents.

assets:
    properties:
        - action: add
          property: css
          resolvePath: true
          input:
                name: "style" 
                ext: "css"

Asset Behaviors

In Toucan, asset behaviors define how specific files — such as stylesheets — are processed during the pipeline execution. These behaviors can transform assets, like minifying CSS files.

assets:
    behaviors:
        - id: minify-css

API support

Beta 4 also brings better API support. With the keyPath and keyPaths engine options Toucan allows pipelines to extract a single or multiple values from the result context. This make it possible to shape what’s included in the final JSON.

id: api
engine: 
    id: json
    options:
        keyPath: "context.posts"

New output arguments have been added to support paginated APIs.

id: api
output:
    path: "api"
    file: "{{iterator.current}}"
    ext: json

Some type definitions are typically exist to be able to run a specific pipeline by including a single, empty type. Now we can spare them. When definesType is true in a pipeline, a virtual type with the same name will be automatically attached.

id: api
definesType: \(definesType ? "true" : "false")

Check the Beta 4 migration guide for more details or the changes of this release on GitHub. Also give us a ⭐️ if you like Toucan.

Try the latest beta and let us know what you think!

Related articles


featured
· 1 min read

Beta 4 migration guide


Migration guide for Toucan Beta 4

featured
· 1 min read

TRY-O Template Release


Introducing TRY-O: The first and free blog template for Toucan.

· 2 min read

Beta 3 migration guide


Migration guide for Toucan Beta 3: covering changes to content structure, theme changes and rendering features.

· 1 min read

Beta 3 is out


The third beta release of Toucan is now ready try. New pipelines, queries, iterators and more.