Skip to content

Including a file multiple times does not re-build the file #114

@skylarmb

Description

@skylarmb

I would like to define a template html file with variables in it, then include it multiple times with different variables during the build. The issue is the first time a file is included with build:include, the contents of the file is processed and included correctly. I then update the variables and include the file again, but it just included the same content as was generated by the first time it was built. Is there some caching going on or something?

Example:

template.html

<!-- build:template
<p>my_var is: <%= my_var %></p>
/build -->

index.html

<!-- build:template
<% my_var="foo" %>
/build -->
<!-- build:include template.html -->
<!-- /build -->

<!-- build:template
<% my_var="bar" %>
/build -->
<!-- build:include template.html -->
<!-- /build -->

result:

<p>my_var is: foo</p>
<p>my_var is: foo</p>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions