Issue: Front Matter overrides LastModified in GoHugo Archetypes #302

Closed
opened 2026-10-05 02:38:56 +02:00 by adam · 2 comments
Owner

I think I might have come upon a bug.

My repo is at https://github.com/davidsneighbour/kollitsch.dev, run npm install, npm run build:frontmatter to create the frontmatter config.

After that try to edit something in one of the archetypes/*.md files. It feels like the automatic last-updated feature is replacing the frontmatter in these files. Archetypes (the folder) is NOT added to my content folders in Front Matter.

In GoHugo the files in archetypes are templates for new content files. They should not be handled like "real" content files. Apart from that, they are NOT content files because I have not added them to the content file type config. I would not expect Front Matter to touch these files in any case.

Edit: I am not 100% sure it's frontmatter, but it feels like that, because I have no other plugin or tool that would exchange some code ({{ .Date }}) with the actual current datetime stamp.

I think I might have come upon a bug. My repo is at https://github.com/davidsneighbour/kollitsch.dev, run `npm install`, `npm run build:frontmatter` to create the frontmatter config. After that try to edit something in one of the `archetypes/*.md` files. It feels like the automatic last-updated feature is replacing the frontmatter in these files. Archetypes (the folder) is NOT added to my content folders in Front Matter. In GoHugo the files in `archetypes` are templates for new content files. They should not be handled like "real" content files. Apart from that, they are NOT content files because I have not added them to the content file type config. I would not expect Front Matter to touch these files in any case. Edit: I am not 100% sure it's frontmatter, but it feels like that, because I have no other plugin or tool that would exchange some code (`{{ .Date }}`) with the actual current datetime stamp. <!-- github-sync-id:1319654491 -->
adam closed this issue 2026-10-05 02:38:56 +02:00
Author
Owner

Thanks for opening the issue @davidsneighbour, will have a check on this.

Thanks for opening the issue @davidsneighbour, will have a check on this. <!-- github-comment-id:1197894141 -->
Author
Owner

@davidsneighbour, this was indeed coming from the extension. An extra check is implemented only to perform the update on content located in your content folder.

@davidsneighbour, this was indeed coming from the extension. An extra check is implemented only to perform the update on content located in your content folder. <!-- github-comment-id:1197905672 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#302