eleventy-plugin-vento 2.0.0-beta.2 → 2.0.0-beta.3
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 +7 -3
- package/package.json +1 -1
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,7 +109,6 @@ export function VentoPlugin(eleventyConfig, options = {}) {
|
|
|
104
109
|
|
|
105
110
|
compileOptions: {
|
|
106
111
|
permalink(linkContents, inputPath) {
|
|
107
|
-
console.log(linkContents);
|
|
108
112
|
if (!linkContents) return linkContents;
|
|
109
113
|
return async (data) => {
|
|
110
114
|
const result = await env.runString(linkContents, data, inputPath);
|