Sorry, I can not make it any clearer. Maybe other can chime in with a better explanation, else see the documentation.
Seems pretty clear to me. Looking forward to the next release.
@bep This is awesome, especially #1629. Default taxonomies pulled from site variables, multiple fields for scheduling (e.g., with now
and AddDate
), etc are going to help archetypes be a fully actualize feature.
This is only food for thought w/r/t how content typing is done with really large sites built in non-SSG CMSs. Iâm not suggesting this is necessarily feasible, or even worthwhile, for Hugo:
- Multiple archetypes that inherit from a single parent archetype (e.g.
person => staff, author, volunteer
) - Archetypes independent of section. For example, if I have
event
andarticle
content types (i.e. archetypes) and want to generate/scaffold an instance of both within the same section. This would lend itself to pre-development content and entity-relationship modeling, which are often part of large business sites.
Iâm not sure how either of these could be accomplished with 1) file-based content typing and 2) Hugoâs current data model that associates sections and type auto-magically, so take this as you will.
Regardless, looking forward to this awesome new feature and v24!
@RobertCvn This explanation of archetypes may help you. They arenât called âarchetypesâ because they âarchâ over the site. In informational science, an archetype is âa formal, re-usable model of a domain concept.â (See Wikipedia.)
I have a fairly set scope for what I want to do here, and I envision a fairly short time frame for this release.
As I mentioned, just food for thought. I wouldnât dare try to force feed you. I think these improvements are going to be awesome. Thanks, Bjorn!
I think @RobertCvn is looking for a way to pass changes made in an archetype file to all existing content files that were made from it. I agree that this is a separate issue from preserving field order, but it would be a nice feature on its own. Is there a good way to push archetype file changes out to existing content files that the archetype should apply to?
How do you know if a content file is created from an archetype file? What you really are talking about, which is also a separate issue, is some âfront matter inheritanceâ.
I would assume that the archetype matches either the type as defined in the file, or the folder that the content file is in.
I realize this isnât always the case, but I think that could be a working assumption for the request.