Releases: noelforte/eleventy-plugin-vento
v4.0.1
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.
Patch Changes
v3.0.2
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
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 Ventoenv
object ever instanced in this plugin, steering away from usingclass
removes some complexity and overhead. -
DATA_KEYS
(used internally) moved into utils file alongside other utilities (like compatibility checks) and renamed toCONTEXT_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 toenv.utils._11ty
since it's probably a more appropriate place to store these functions.
-
v3.0.0
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()
andgetPairedShortcodes()
functions that were added inalpha.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.
Because these changes removed direct dependence on Eleventy JavaScript functions, the
addHelpers
option has been replaced with 3 new options:shortcodes
,pairedShortcodes
andfilters
. 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
functionalityStarting with this release the way the
auto_trim
plugin is implemented is a bit different.The plugin option
trimTags
is nowautotrim
. 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
fromventojs
. 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 asautotrim: ['@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.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