Skip to content
Discussion options

You must be logged in to vote

Edited as I'm not sure which template language you're using. Thought it was liquid but that doesn't have @last


You're on the right track. The issue is that you're adding your source file content/notes/data.json as a .json file. .json files are not considered template files and by default will not be processed.

Instead rename it to content/notes/data.njk so it becomes a template file and will be processed. You can use any template language you like, but I know Nunjucks so the code below should work.

You'll also want to add a permalink to the front matter of your template. This defines where the file is written out to and importantly allows you to set .json as it's file extension. If you d…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dave-kennedy
Comment options

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