Using Nunjucks inheritance
reinoute opened this issue · comments
Reinout commented
Is there any way I can get Nunjucks inheritance (extends
) to work?
It looks like the plugin uses Nunjucks renderString
to parse the template (and not the FileSystemLoader).
If it's not possible, is there an alternative way to achieve having 'master' templates such as the example below?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
{% block header %}{% endblock %}
</head>
<body>
{% block content %}{% endblock %}
</body>
</html>
chocolateboy commented
Probably an instance of this bug. Inheritance with extends
works fine for me, but only if referenced files are in the same directory. Ditto import
and include
.