-
-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
liquidjs Regression on Relative Includes #1995
Comments
Shipping with 1.0.0-beta.5 |
Hmmm… not sure if this is a bug, or a change in the intended behaviour. I want to use eleventyConfig.setLiquidOptions({
globals: {
app: require('./src/data/app.js'),
dates: require('./src/data/dates.js'),
navigation: require('./src/data/navigation.js'),
srcsets: require('./src/data/srcsets.js'),
},
});
…
return {
dir: {
input: './src',
output: 'www',
includes: 'includes',
layouts: 'layouts',
data: 'data',
},
templateFormats: ['liquid', 'md'],
}; However I get the following error: [11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] > Having trouble writing template: www/bookmarks/2010/08/facebook_places/index.html
`TemplateWriterWriteError` was thrown
[11ty] > undefined is not iterable (cannot read property Symbol(Symbol.iterator)), file:./src/layouts/bookmark.liquid, line:1, col:1
`RenderError` was thrown
[11ty] > undefined is not iterable (cannot read property Symbol(Symbol.iterator))
`TypeError` was thrown:
[11ty] TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
at __values (/Users/paulrobertlloyd/Sites/paulrobertlloyd-v4/node_modules/liquidjs/dist/liquid.node.cjs.js:91:46)
at Render.<anonymous> (/Users/paulrobertlloyd/Sites/paulrobertlloyd-v4/node_modules/liquidjs/dist/liquid.node.cjs.js:1101:35)
at step (/Users/paulrobertlloyd/Sites/paulrobertlloyd-v4/node_modules/liquidjs/dist/liquid.node.cjs.js:84:23)
at Object.next (/Users/paulrobertlloyd/Sites/paulrobertlloyd-v4/node_modules/liquidjs/dist/liquid.node.cjs.js:65:53)
at reduce (/Users/paulrobertlloyd/Sites/paulrobertlloyd-v4/node_modules/liquidjs/dist/liquid.node.cjs.js:1021:25)
at toThenable (/Users/paulrobertlloyd/Sites/paulrobertlloyd-v4/node_modules/liquidjs/dist/liquid.node.cjs.js:1016:16)
at reduce (/Users/paulrobertlloyd/Sites/paulrobertlloyd-v4/node_modules/liquidjs/dist/liquid.node.cjs.js:1028:16)
at Object.then (/Users/paulrobertlloyd/Sites/paulrobertlloyd-v4/node_modules/liquidjs/dist/liquid.node.cjs.js:989:43)
at reduce (/Users/paulrobertlloyd/Sites/paulrobertlloyd-v4/node_modules/liquidjs/dist/liquid.node.cjs.js:1028:40)
at Object.then (/Users/paulrobertlloyd/Sites/paulrobertlloyd-v4/node_modules/liquidjs/dist/liquid.node.cjs.js:989:43) If I add eleventyConfig.setLiquidOptions({
globals: {
app: require('./src/data/app.js'),
dates: require('./src/data/dates.js'),
navigation: require('./src/data/navigation.js'),
srcsets: require('./src/data/srcsets.js'),
},
layouts: './src/layouts',
partials: './src/includes',
}); Does |
@paulrobertlloyd was this resolved with the 1.0 stable release? Seems to work okay for me with this config file: module.exports = function(eleventyConfig) {
eleventyConfig.setLiquidOptions({
globals: {
app: { hi: 123 },
dates: {},
navigation: {},
srcsets: {},
},
});
return {
dir: {
input: '.',
output: 'www',
includes: 'includes',
layouts: 'layouts',
data: 'data',
},
templateFormats: ['liquid', 'md'],
};
}; |
Afraid not. With the following config: module.exports = function (eleventy) {
eleventy.setLiquidOptions({
cache: true,
globals: {
app: require('./src/data/app.js'),
dates: require('./src/data/dates.js'),
navigation: require('./src/data/navigation.js'),
},
});
return {
dir: {
input: 'src',
output: 'www',
includes: 'includes',
layouts: 'layouts',
data: 'data',
},
templateFormats: ['liquid', 'md', '11ty.js'],
};
}; I get the following error: [11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] 1. Having trouble writing template: "www/notes/1493239140/index.html" (via EleventyTemplateError)
[11ty] 2. ENOENT: Failed to lookup "default" in "src/includes,src", file:./src/layouts/note.liquid, line:1, col:1 (via RenderError)
[11ty] 3. ENOENT: Failed to lookup "default" in "src/includes,src" (via Error)
[11ty]
[11ty] Original error stack trace: Error: ENOENT: Failed to lookup "default" in "src/includes,src"
[11ty] at Loader.lookupError (/Users/paulrobertlloyd/Sites/paulrobertlloyd-v4/node_modules/liquidjs/dist/liquid.node.cjs.js:974:19)
[11ty] at Loader.<anonymous> (/Users/paulrobertlloyd/Sites/paulrobertlloyd-v4/node_modules/liquidjs/dist/liquid.node.cjs.js:887:37)
[11ty] at step (/Users/paulrobertlloyd/Sites/paulrobertlloyd-v4/node_modules/liquidjs/dist/liquid.node.cjs.js:87:23)
[11ty] at Object.next (/Users/paulrobertlloyd/Sites/paulrobertlloyd-v4/node_modules/liquidjs/dist/liquid.node.cjs.js:68:53)
[11ty] at reduce (/Users/paulrobertlloyd/Sites/paulrobertlloyd-v4/node_modules/liquidjs/dist/liquid.node.cjs.js:1044:25)
[11ty] Copied 1504 files / Wrote 0 files in 4.54 seconds (v1.0.1-canary.3) It seems to be looking for the Explicitly adding a value for eleventy.setLiquidOptions({
cache: true,
globals: {
app: require('./src/data/app.js'),
dates: require('./src/data/dates.js'),
navigation: require('./src/data/navigation.js'),
},
layouts: './src/layouts',
}); |
Related to harttle/liquidjs#395 (comment)
Locked to
liquidjs
9.25.x starting in Beta 1.cc @paulrobertlloyd
The text was updated successfully, but these errors were encountered: