Skip to content
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

Multiple include problem #492

Closed
goschevski opened this issue Aug 13, 2015 · 2 comments
Closed

Multiple include problem #492

goschevski opened this issue Aug 13, 2015 · 2 comments

Comments

@goschevski
Copy link

Hi,

I'm using browserify and nunjucksify to pre-compile templates.

I have a problem when I want to add 2 or more include statements in the template

layouts/base.nunj

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />

        <title></title>
        <meta name="description" content="" />

        <link rel="stylesheet" href="public/css/style.css">
    </head>
    <body>
        {% block page %}{% endblock %}

        <script src="public/js/index.js"></script>
    </body>
</html>

pages/home.nunj

{% extends "../layouts/base.nunj" %}

{% block page %}
    <div class="Page">
        {% include "../partials/shared/header.nunj" %}

        {% include "../partials/home/content.nunj" %}

        {% include "../partials/shared/footer.nunj" %}
    </div>
{% endblock %}

If I leave only 1 of those 3 partials, it will work. If I have 2 or more included partials i get this error:

Uncaught Template render error: (unknown path)
Template render error: Template render error: Template render error: (unknown path)
RangeError: Maximum call stack size exceeded

Am I doing something wrong or this is a bug?

@jlongster
Copy link
Contributor

It may be a problem with nunjucksify, or something that was fixed in the latest 2.0. I cannot reproduce. Please re-open if you can still reproduce without nunjucksify.

@goschevski
Copy link
Author

Thanks, I've asked for help on nunjucksify repo - rotundasoftware/nunjucksify#10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants