Skip to content

Releases: noelforte/eleventy-plugin-vento

v3.1.0

24 Oct 23:27
bb128ce
Compare
Choose a tag to compare

NOTE: This release replaces the (now-unpublished) pre-release version 3.0.3-next.0. Users of this plugin should use 3.1.0.

Minor Changes

  • 7e6ba68: Separate shortcodes and pairedShortcodes into seperate object namespaces. Prior to this version, Eleventy shortcodes and paired shortcodes were merged into a single object keyed as _11ty.functions which allowed for naming collisions between shortcodes and their paired counterparts.

  • b8f0a03: Adds new dependency on debug package, to help out with testing and getting more verbose logs. The following DEBUG namespaces are implemented:

    • Eleventy:Vento:Setup - Logs initial setup of the plugin, loading features, pre-page compile setup steps (like changing page and eleventy objects)
    • Eleventy:Vento:Cache - Logs updates to Vento's own internal cache, which is used in tandem with Eleventy's cache.
    • Eleventy:Vento:Template - Logs rendered templates and other template related actions

    Because it is a child of the Eleventy: namespace, the following command will include output from this plugin as well:

    $ DEBUG='Eleventy:*' npx @11ty/eleventy

    Alternatively, use a finer grained namespace to see only the output generated by eleventy-plugin-vento.

    $ DEBUG='Eleventy:Vento:*' npx @11ty/eleventy
    $ DEBUG='Eleventy:Vento:Template' npx @11ty/eleventy

    See the docs on 11ty.dev as well as the debug package README for more information.

  • ec02a76: Further caching improvements to e811123 and e46ce6e. Eleventy now defers all template caching to Vento.

    Templates are now compiled directly instead of using Vento's .runString method which reduces overhead and enables this plugin to manage the Vento cache in a more direct manner.

  • 494b184: Permalink compilation optimizations:

    • Permalinks now short-circuit to raw strings if they don't contain Vento template syntax, avoiding compilation entirely.
    • Permalinks are now assigned (fake) pathnames in Vento's cache. If you change template content but don't change a dynamic permalink in development, Vento will reuse the compiled permalink template. Note that any modifications to a template file will always cause it to be recompiled (see 19c352fa) — this improvement just optimizes recompiling dynamic permalinks that haven't changed.

Patch Changes

  • 4b4b387: Entries for changed files are now deleted from Vento's cache when running the Eleventy Dev server. (fixes #38)

v3.0.2

14 Oct 20:29
f6273e4
Compare
Choose a tag to compare

Patch Changes

  • e46ce6e: Integrate eleventy and vento caching.

    There have been a few issues around managing Vento's cache that have yielded uninteded results when compiling templates (ie #10, #34). This update integrates Vento's cache with Eleventy's custom extension API.

    This means that whether running Eleventy in --serve mode or compiling dynamic permalinks, stale cache data actually gets removed so Vento can compile the template from source again.

    Raise any issues if caching behavior continues to be an issue!

v3.0.1

29 Sep 21:55
f82da47
Compare
Choose a tag to compare

Patch Changes

  • 9f5a90f: Various Refactors - These changes shouldn't have any observable effect on your templates or usage.

    • Replaced class based approach for a closure implementation instead. Since there was only 1 Vento env object ever instanced in this plugin, steering away from using class removes some complexity and overhead.

    • DATA_KEYS (used internally) moved into utils file alongside other utilities (like compatibility checks) and renamed to CONTEXT_DATA_KEYS.

    • Moved internal Vento/11ty data from env._11ty => env.utils._11ty. Previous versions mutated the Vento env object by adding an _11ty key with everything that needed accessing from within a template compile (shortcodes, filters, etc.). This was moved this back to env.utils._11ty since it's probably a more appropriate place to store these functions.

v3.0.0

21 Sep 04:12
6d47fd2
Compare
Choose a tag to compare

A massive thank you to @oscarotero for helping me understand the Vento engine, this release would not have been possible without him. There may be a few latent bugs, so be sure to raise issues as they come up.


Major Changes

  • 668700c: Enforce new minimum version — Eleventy v3.0.0-alpha.15 or later is now required for this plugin to function.

    Although this goes against the backwards compatibility ethos of Eleventy, the addition of the getShortcodes() and getPairedShortcodes() functions that were added in alpha.15 are now utilized in this plugin to bring even more goodness to your templates.

    Thanks @zachleat for making this possible!

  • 9d8eb8a: Adds complete support for Eleventy shortcodes and filters within Vento. Shortcodes are now loaded by default as Vento tags and will no longer be exposed as functions in your page data.

    The implementation of single shortcodes remains largely similar, just replace function-like calls with Vento tags.

    - {{ nametag('Noel', 'Forte') }}
    + {{ nametag 'Noel', 'Forte' }}

    Of course, the big news is that paired shortcodes are now officially supported by this plugin!! Prior to this release, paired shortcodes were exposed just like regular shortcodes, but were plain JS functions. With this release you can now use paired shortcodes just like any other tag.

    <!-- Before: everything is jammed into the function call :( -->
    {{ blockquote("<p>Call me Ishmael. Some years ago—never mind how long precisely—having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world.</p>\n<p>It is a way I have of driving off the spleen and regulating the circulation.</p>", "Herman Melville", "1851") }}
    
    <!-- After: opening and closing tags with arguments separated :) -->
    {{ blockquote 'Herman Melville', '1851' }}
      <p>Call me Ishmael. Some years ago—never mind how long precisely—having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world.</p>
      <p>It is a way I have of driving off the spleen and regulating the circulation.</p>
    {{ /blockquote }}

    Because these changes removed direct dependence on Eleventy JavaScript functions, the addHelpers option has been replaced with 3 new options: shortcodes, pairedShortcodes and filters. All of them are enabled by default but can be disabled in your plugin config like so.

    eleventyConfig.addPlugin(VentoPlugin, {
    - addHelpers: false,
    + shortcodes: false,
    + pairedShortcodes: false,
    + filters: false,
    });
  • 516cd2f: Modifications to auto_trim functionality

    Starting with this release the way the auto_trim plugin is implemented is a bit different.

    The plugin option trimTags is now autotrim. Be sure to update your plugin options object accordingly:

    eleventyConfig.addPlugin(VentoPlugin, {
    - trimTags: true
    + autotrim: true
    });

    Additionally, the eleventy plugin no longer re-exports defaultTags from ventojs. Be sure to remove any imports from your config:

    - import { ventoDefaultTrimTags } from 'eleventy-plugin-vento';

    To extend the default tags list, this plugin now provides a 2 placeholder values for your array of tags, @vento and @11ty. When the plugin executes, @vento will be expanded to the default vento tags list, and @11ty will be expanded to the names of all paired shortcodes.

    eleventyConfig.addPlugin(VentoPlugin, {
      autotrim: ['@vento', '@11ty', 'tag1', 'tag2'],
    });

    Setting autotrim: true is the same as autotrim: ['@vento', '@11ty'].

Minor Changes

  • ff75e09: Add option to explicitly enable tag ignore syntax.

    Prior to this release this feature was referred to as the "SSR" or "hybrid-rendering" syntax. It's purpose was to skip over processing a tag like Vento's built-in {{ echo }} tag, but with a much shorter syntax: {{! ... }}. Any code following a ! in your markup is wrapped in {{ }} and output as-is.

    {{!> console.log('Hello world'); }} <!-- tag remains in output -->

    In this release, this behavior is now explicitly opt-in. To enable it, include ignoreTag: true in the plugin options:

    eleventyConfig.addPlugin(VentoPlugin, {
      ignoreTag: true,
    });
  • b9e8232: Update ventojs to 1.12.10

v2.6.0

15 Jul 03:37
5b5035a
Compare
Choose a tag to compare

2.6.0 (2024-07-15)

New Features

Bug Fixes

  • remove inputPath from cache if rawInput doesn't match inputContent (529d0b5)

v2.5.0

13 Jul 09:30
2f664f3
Compare
Choose a tag to compare

2.5.0 (2024-07-13)

Dependency Updates

  • update dependency ventojs to v0.12.9 (2f664f3)

v2.4.0

10 Jul 09:14
f08ed15
Compare
Choose a tag to compare

2.4.0 (2024-07-10)

Dependency Updates

  • update dependency ventojs to v0.12.8 (f08ed15)

v2.3.0

11 Jun 21:26
Compare
Choose a tag to compare

2.3.0 (2024-06-11)

New Features

v2.2.0

10 Jun 22:05
5d8616b
Compare
Choose a tag to compare

2.2.0 (2024-06-10)

New Features

  • update ventojs to 0.12.7 (f4735ba)

Bug Fixes

  • remove input path when compiling permalinks, it messes up the cache (7dcae1a)

v2.1.0

09 Jun 22:00
Compare
Choose a tag to compare

2.1.0 (2024-06-09)

New Features

  • only bind page and eleventy to helper functions to align with core functionality (a2e023c)

Bug Fixes

  • trimTags now applies default tags as expected when set to true (9b25279)
  • filters: use env.filters instead of filters so filters load correctly (145029e)
  • use eleventyConfig.directories to resolve includes directory (3e1a88a)