# Keep schema on content files up to date on Hugo based on archetype's?

**URL:** <https://discourse.gohugo.io/t/keep-schema-on-content-files-up-to-date-on-hugo-based-on-archetypes/28003>\
**Category:** feature\
**Created:** [September 4, 2020, 3:58am UTC](https://discourse.gohugo.io/t/keep-schema-on-content-files-up-to-date-on-hugo-based-on-archetypes/28003 "2020-09-04T03:58:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![saitor](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@saitor](https://discourse.gohugo.io/u/saitor)\
**Post date:** [September 4, 2020, 3:58am UTC](https://discourse.gohugo.io/t/keep-schema-on-content-files-up-to-date-on-hugo-based-on-archetypes/28003/1 "2020-09-04T03:58:17Z")

</div>

Hey,

I rely a _lot_ my archtypes. As our platform (built on Hugo) grows, I’m finding it hard to keep my content files up to date with the new keys in my archetype.

Things I normally update my archetype’s with;

- Hash comments: to define what a field was about
- Empty quotes to define the main key
- Default values for taxonomyies, event dates, etc that I shouldn’t be misspelling or forgetting 🙃

Is there a way to have Hugo run through the markdown files and automatically update the files with the newly defined keys and comments from my archetype?

Basically, look for anything that’s different from the source file, and add in the new fields. Don’t remove any field.

If I use something like Forestry, or Netlify CMS, it would solve this problem because they update your markdown file based on the YAML post type fields we newly add. We don’t want to integrate with a CMS in our stack because much faster for our teams to just work with archetypes.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [September 4, 2020, 5:41am UTC](https://discourse.gohugo.io/t/keep-schema-on-content-files-up-to-date-on-hugo-based-on-archetypes/28003/2 "2020-09-04T05:41:51Z")

</div>

> [@saitor](#):
>
> Is there a way to have Hugo run through the markdown files and automatically update the files with the newly defined keys and comments from my archetype?

No, there is not.

---

<div class="post-metadata">

**Author:** ![HenrySkup](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/henryskup/32/8183_2.png) [@HenrySkup](https://discourse.gohugo.io/u/HenrySkup)\
**Post date:** [September 4, 2020, 8:01am UTC](https://discourse.gohugo.io/t/keep-schema-on-content-files-up-to-date-on-hugo-based-on-archetypes/28003/3 "2020-09-04T08:01:24Z")

</div>

Even Forestry’s model isn’t all that smart about updates. From what I can tell your forestry archetypes tell the UI what fields to display. if there is an update if the field has the same name, it will overwrite. it will leave any “old data” that doesn’t match your field names.
