I was wondering if it is possible to automatically update my content (Markdown) files whenever I add new fields to its correspondig archetype.
A simple example: I have
blog/post123.md with this content:
--- title: Blah date: 2018-02-12T16:52:50+01:00 draft: true --- # Hello! This is a blog post
Then, later on, I decide to add an extra field to
--- title: Blah date: 2018-02-12T16:52:50+01:00 draft: true newsletter: true ---
layouts/blog.html I use this boolean value to decide whether I want to show my newsletter signup form on that specific blog post or not.
Now, I wish this new ‘default’ field would be added to all existing content automatically (with its default value of false) — not only to new content that I create with
hugo new blog/another.md), but also for existing content. Now I manually add these new fields for each content file, but I’m not sure if I’m supposed to be doing that.