eleventy-plugin-vento 2.0.0-beta.2 → 2.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/VentoPlugin.js CHANGED
@@ -63,6 +63,11 @@ export function VentoPlugin(eleventyConfig, options = {}) {
63
63
  }
64
64
  }
65
65
 
66
+ // Load filters into vento
67
+ for (const filter in filters) {
68
+ env.filters[filter] = filters[filter];
69
+ }
70
+
66
71
  // Load user-defined plugins into vento
67
72
  for (const plugin of options.plugins) env.use(plugin);
68
73
 
@@ -87,8 +92,8 @@ export function VentoPlugin(eleventyConfig, options = {}) {
87
92
  }
88
93
 
89
94
  // Rebind filters the same way
90
- for (const filter in filters) {
91
- env.filters[filter] = filters[filter].bind(data);
95
+ for (const filter in env.filters) {
96
+ env.filters[filter] = env.filters[filter].bind(data);
92
97
  }
93
98
 
94
99
  // Merge helpers into page data
@@ -104,8 +109,7 @@ export function VentoPlugin(eleventyConfig, options = {}) {
104
109
 
105
110
  compileOptions: {
106
111
  permalink(linkContents, inputPath) {
107
- console.log(linkContents);
108
- if (!linkContents) return linkContents;
112
+ if (typeof linkContents !== 'string') return linkContents;
109
113
  return async (data) => {
110
114
  const result = await env.runString(linkContents, data, inputPath);
111
115
  return result.content;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eleventy-plugin-vento",
3
- "version": "2.0.0-beta.2",
3
+ "version": "2.0.0-beta.4",
4
4
  "description": "Adds support for the Vento templating language to Eleventy.",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@9.1.4",
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: Skipped
3
+ layout: page-layout.vto
4
+ permalink: false
5
+ ---
6
+
7
+ Leave me out of this.