Releases: noelforte/eleventy-plugin-vento
v4.1.1
Patch Changes
-
335f21e: Select type updates (shouldn't affect compilation, however should improve DX)
Changes are:
- split types into separate files
- namespace
ventojs
type imports - make
PluginOptions
optional by default - make Eleventy types more readable
- declare a special (
EleventyVentoEnvironment
) for this plugin to replace Vento's ownEnvironment
-
070109a: Refactored files and functions internally that shouldn't have any impact on usage or performance:
-
c382be0: Wrap all filters as regular synchronous functions to avoid ambiguity with sync and async handling. (fixes #96)
This change enforces explicit use of the
await
keyword to unwrap returned values from filters before chaining more or printing the result.<!-- Single filters --> - {{ "Hello, async!" |> someAsyncFilter }} + {{ "Hello, async!" |> await someAsyncFilter }} <!-- Filter chains --> - {{ "Hello, async!" |> someAsyncFilter |> someSyncFilter }} + {{ "Hello, async!" |> await someAsyncFilter |> someSyncFilter }}
See the Vento docs on async chains for more information.
-
9eaa059: Update
debug
to v4.4.0 -
0b0f96a: Update ventojs to v1.12.14
v4.1.1-beta.0
Patch Changes
-
335f21e: Select type updates (shouldn't affect compilation, however should improve DX)
Changes are:
- split types into separate files
- namespace
ventojs
type imports - make
PluginOptions
optional by default - make Eleventy types more readable
- declare a special (
EleventyVentoEnvironment
) for this plugin to replace Vento's ownEnvironment
-
9eaa059: Update
debug
to v4.4.0 -
f387b5e: Update
ventojs
to v1.12.13 -
070109a: Refactored files and functions internally that shouldn't have any impact on usage or performance:
v4.1.0
Minor Changes
-
eb33d79: Expose Vento's
FilterThis
on Eleventy-declared filters. (fixes #72)[!IMPORTANT]
Using this feature incurs the same performance regression thateleventyComputed
template strings do. Caching can assist with this, see README for more information.Vento binds its own
this
object when executing filter functions. Thethis
object contains 2 keys,this.env
andthis.data
, for getting access to both the Vento environment and the template data respectively.In addition to Vento's object,
this.page
andthis.eleventy
are also cloned to the top level fromthis.data
to maintain feature-parity with Eleventy.With this change, you can now create filters that leverage the Vento environment. See README for more info.
-
eb33d79: Update vento to 1.12.12
v4.0.1
Patch Changes
- hotfix - include
types
field in package.json to declare bundled types
v4.0.0
Major Changes
-
fc80b5f: Removed ignore tag
{{! ... }}
syntax. As mentioned in the 3.3.0 release notes, the now preferred way to "pass through" tags is with string literals.You should update code with
{{! ... }}
to be{{ '{{ }}' }}
like so:- {{! if condition }} + {{ '{{ if condition }}' }} do something - {{! /if }} + {{ '{{ /if }}' }}
While more verbose, this change ensures that there isn't any ambiguity between a tag that needs ignoring and JS negation expressions.
Minor Changes
v3.4.0
Minor Changes
- 8c6b8a2: Update
ventojs
to v1.12.11
v4.0.0-beta.0
Major Changes
-
fc80b5f: Removed ignore tag
{{! ... }}
syntax. As mentioned in the 3.3.0 release notes, the now preferred way to "pass through" tags is with string literals.You should update code with
{{! ... }}
to be{{ '{{ }}' }}
like so:- {{! if condition }} + {{ '{{ if condition }}' }} do something - {{! /if }} + {{ '{{ /if }}' }}
While more verbose, this change ensures that there isn't any ambiguity between a tag that needs ignoring and JS negation expressions.
Minor Changes
v3.3.0
Minor Changes
-
387eb48:
⚠️ DEPRECATION NOTICE: Ignore tag{{! ... }}
syntax is now deprecated and will be removed in 4.0.0.This change comes in favor of using string literals to "pass through" tags without rendering them, like so:
- {{! if condition }} + {{ '{{ if condition }}' }} do something - {{! /if }} - {{ '{{ /if }}' }}
While more verbose, this change ensures that there isn't any ambiguity between a tag that needs ignoring and JS negation expressions:
If an improved syntax for deferred rendering scenarios ever makes its way to Vento, it will be made available in this plugin.
v3.2.0
Minor Changes
-
f9388e1: Further refine caching between Eleventy and Vento: commit ec02a76 deferred all caching to Vento and turned off Eleventy's cache (released in 3.1.0). This release allows Vento to cache only the templates that Eleventy can't cache (permalinks, includes, etc.), and Eleventy caches everything else.
A performance oversight has also been resolved by this change. Now, template functions are pre-compiled and saved by Eleventy, only running the template on render without having to go through a re-compile or get a template from the cache.
Patch Changes
-
693e1a2: Refactored the following features internally:
- Reverts 2c3548c for modularity: The compatibility check has moved back to
modules/utils.js
- Revises caching further: Instead of deferring to Vento for everything, permalink templates and templates loaded by Vento (like includes) are cached by Vento. Everything else is cached by Eleventy.
- Rename some internal variables to help with readability (
_11ty.ctx => _11Ctx
) DEBUG
keyEleventy:Vento:Template
renamed toEleventy:Vento:Render
- Declare engine functions separately and return as an object after everything has been declared.
- Reverts 2c3548c for modularity: The compatibility check has moved back to
v3.1.0
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
andpairedShortcodes
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 followingDEBUG
namespaces are implemented:Eleventy:Vento:Setup
- Logs initial setup of the plugin, loading features, pre-page compile setup steps (like changingpage
andeleventy
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.