-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
Render tag cannot resolve files #419
Comments
I've had the same issue here on my repo for a little while now. I'm using latest liquidjs and node version. For context this is the script I use to render the html: 'use strict';
const { resolve } = require('upath');
const { Liquid } = require('liquidjs');
const { readdirSync, writeFileSync } = require('graceful-fs');
const engine = new Liquid({
extname: '.liquid'
});
function renderHtml() {
readdirSync(resolve(__dirname, './pages')).forEach(file => {
engine.renderFile(resolve(__dirname, `./pages/${file}`)).then(html => {
writeFileSync(resolve(__dirname, `./dist/${file.replace('.liquid', '.html')}`), html);
});
});
}
renderHtml(); Looks related to #395.
|
Yes, I had read that issue, but as that was in connection with Eleventy, I wanted to make a new one clarifying that this is with nothing else, just liquidjs. |
@TheSilkky It seems 9.27.0 doesn't do this and works fine for me. That's the only version that has renderfiletonodestream and can resolve file paths |
Downgrading to 9.27.0 didn't work for me I'm still getting the same error. |
I believe it's related to this, will be traced there, closing this issue. |
🎉 This issue has been resolved in version 9.28.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@ekwoka Thank you for specifically addressing this issue. Now demo/nodejs works! @TheSilkky if you're still experiencing other issues, feel free to open another issue for that! |
Fantastic work! Thank you so much! |
I'm loving the idea and got basic file saving and such working.
But I can't get includes or renders or layouts working at all. Rendering the file resolves the file and renders fine, but if it includes something else it breaks.
Even cloning the demo repo gets the same error:
ENOENT: Failed to lookup "html.liquid" in "./layouts"
And that's the demo repo.
I don't know what else to even mention since the demo repo itself isn't working and I didn't even touch it.
For informations sake:
Using latest macOS
Latest Node
tried both Latest liquidjs and 9.27 (the one the demo repo uses).
The text was updated successfully, but these errors were encountered: