· 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
· 2 min read

Toucan SGG enters the release candidate phase


After multiple alpha and beta releases, Toucan, the Swift-based static site generator, has entered its Release Candidate phase.

· 1 min read

Beta 5 is now available


The fifth beta release of Toucan is now available. This release includes many improvements and some new features.

· 1 min read

Beta 3 is out


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

· 1 min read

Beta 2 is now available


The second beta release of Toucan is now available. This release includes many improvements and some new features.