Skip to content

Releases: robinmetral/brut

v0.0.36

15 Aug 14:06
59c7cb5
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.0.35...v0.0.36

v0.0.35

14 Aug 13:03
85f6596
Compare
Choose a tag to compare

What's Changed

  • Add permalinks and allow creating custom web feeds by @robinmetral in #38

Full Changelog: v0.0.34...v0.0.35

v0.0.34

14 Aug 13:02
2d3dadd
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.0.33...v0.0.34

v0.0.33

09 Aug 05:34
Compare
Choose a tag to compare

Allow missing or empty partials and templates directories

This release is a minor fix to v0.0.32 that allows a partials or a templates directory to missing or left empty, without failing the build.

Full Changelog: v0.0.32...v0.0.33

v0.0.32

09 Aug 05:29
80cb5d5
Compare
Choose a tag to compare

Partials

This release exposes mustache partials, making it easier to compose templates without repeating sections such as site navigation or footer.

To start using partials, add a file to the /partials directory at your project root. The files will be picked up by brut and handed over to mustache at build time. This directory can be configured by setting a partialsDir in brut.config.js.

To reference a partial on a page, use its filename without the extension:

  • /partials/nav.html 👉 {{ > nav }}
  • /partials/footer.whatever 👉 {{ > footer }}
  • /partials/whatever/navitem.html 👉 {{ > navitem }}

Templates breaking change

Previously, template files could be located anywhere in a project, and simply had to be defined in frontmatter using their path from the project root:

  • /templates/base.html 👉 template: /templates/base.html
  • /whatever/article.html 👉 template: /whatever/article.html

Version 0.0.32 introduces a new templates folder. Add your templates to /templates, and they will be picked up by brut at build time. The directory can be configured by setting a partialsDir in brut.config.js.

To define a template path in frontmatter, use its filename without the extension:

  • /templates/base.html 👉 template: base
  • /templates/whatever/article.html 👉 template: article

A major benefit of having templates in a predefined directory is that all templates can be loaded at once at the beginning of the build process, instead of loading them on the fly when a template path was encountered in frontmatter. This reduces the number of filesystem operations and has significant build performance benefits.

Changelog

Full Changelog: v0.0.31...v0.0.32

v0.0.31

08 Aug 15:47
0fefefa
Compare
Choose a tag to compare

What's Changed

  • Remove TypeScript by @robinmetral in #29. See #22 for rationale. This should not have changed anything.
  • Fix 404 by @robinmetral in #30. This fixes the Cloudflare Pages-specific issue. See #20 for more context and a vendor-agnostic follow-up.

Full Changelog: v0.0.30...v0.0.31

v0.0.30

15 Apr 13:59
Compare
Choose a tag to compare

What changed

  • Custom build scripts for pages now receive the page's relative path as a third parameter:

    export async function buildPage(
      html: string,
      frontmatter: { [key: string]: string },
    + path: string,
    ): Promise<string> {
      /* do something with the html */
      return html;
    }
  • Bumped minimist to v1.2.6 to address CVE-2021-44906