Skip to content
Discussion options

You must be logged in to vote

So, in this line, excerpt tag will extract templateContent from post. The problem is that this collections.all includes all content including ./src/index.njk itself, hence a circular reference error is thrown because it can't get the template content of itself while it's currently rendering.
Therefore don't use collections.all, you can use custom filtering instead with getFilteredByGlob("./src/posts/*.md") if you only want to include posts.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@loctran016
Comment options

@guilleliss
Comment options

Answer selected by loctran016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants