Skip to content

Cache not updating on nested includes #2582

@scottmas

Description

@scottmas

Howdy hey. So I'm running into this problem when using the alternate hexo-renderer-markdown-it renderer with the markdown-it-include plugin.

My setup is as follows:

My template index.ejs looks like this:

<!-- index.ejs -->
<h1> Some h1 </h1>
<%- page.content %>

My index.md page looks like this (note the custom syntax provided by the markdown-it plugin):

---
title: API Reference
---
## Some h2
!!! include(source/includes/somePartial.md) !!! 

And somePartial.md looks like this:

### Some h3

The configuration works great when index.md gets modified. But if I modify somePartial.md the cache doesn't get invalidated and I see the stale content that previously was in somePartial.md. The only way to see the new content is to delete db.json or modify index.md. Note that modify index.ejs does not allow me to see the new content.

Is there any workaround I can do to fix this? I think the problem is the nested including, where the markdown file is itself including a partial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionNeeds help in usagewontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions