-
Notifications
You must be signed in to change notification settings - Fork 87
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
TwigException: Cannot extend an inline template. #99
Comments
Hi, i don't think twig implemented in Node supports layout. Ref: https://github.com/twigjs/twig.js
I'll close the issue, feel free to ope it if i'm wrong. |
Hey guys, reading the implementation notes on the twigjs repo, it looks like The solution appears to involve passing an |
@vbustamante Thanks for the correction, now it seems the problem of consolidate.js, it ONLY passes a |
👋 I'm struggling with this issue
The <!DOCTYPE html>
<html lang="fr">
<head>...</head>
<body>
<main>{% block main %}{% endblock %}</main>
</body>
</html> The page that extends {% extends "template.html" %}
{% block main %}
<p>Hello</p>
{% endblock %} My config const views = require('koa-views');
app.use(
views(pathUtil.viewsPath(), {
extension: 'html',
map: {
html: 'twig',
},
options: {
allowIncludeTemplates: true,
},
}),
); What I am doing wrong ? |
Update But it still doesn't work :'( |
Not sure if this is the correct place.
I try to use twig.js with koa 2:
Now i'll try to use a layout
layout.twig:
home.twig
Now i'm getting this error:
Anyone an idea what i did wrong here?
The text was updated successfully, but these errors were encountered: