Hugo default content type (which frontmatter almost complete description can be found at the end of this text) can be extended with custom content type. Frontmattter allow for custom content type definition, but does not allow these content type to inherit fields from others content types. In Hugo case, adding a complex content type based on hugo default features add a lot of content to frontmatter.json and make it unreadable.
A easy solution should be to allow for content types to have a parent content type of which they inherit the fields.
A more complex but adaptable solution should be to allow for content types to have multiple parents of which they inherit the fields.
Here is the frontmatter.json extract for an mostly complete Hugo default content type to give you an idea of the length of a complete Hugo content type:
You can define the fields to re-use in other content types in the frontMatter.taxonomy.fieldGroups setting, and in your content type, all you need to do is use the fieldCollection field type. Front Mattter CMS will then automatically populate the content type with the fields you've defined in the field group.
The `fieldCollection` field type supports this kind of functionality: https://frontmatter.codes/docs/content-creation/fields#fieldcollection
You can define the fields to re-use in other content types in the `frontMatter.taxonomy.fieldGroups` setting, and in your content type, all you need to do is use the `fieldCollection` field type. Front Mattter CMS will then automatically populate the content type with the fields you've defined in the field group.
<!-- github-comment-id:2004436042 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hugo default content type (which frontmatter almost complete description can be found at the end of this text) can be extended with custom content type. Frontmattter allow for custom content type definition, but does not allow these content type to inherit fields from others content types. In Hugo case, adding a complex content type based on hugo default features add a lot of content to frontmatter.json and make it unreadable.
A easy solution should be to allow for content types to have a parent content type of which they inherit the fields.
A more complex but adaptable solution should be to allow for content types to have multiple parents of which they inherit the fields.
Here is the frontmatter.json extract for an mostly complete Hugo default content type to give you an idea of the length of a complete Hugo content type:
This would definitely make maintaining content type definitions easier.
The
fieldCollectionfield type supports this kind of functionality: https://frontmatter.codes/docs/content-creation/fields#fieldcollectionYou can define the fields to re-use in other content types in the
frontMatter.taxonomy.fieldGroupssetting, and in your content type, all you need to do is use thefieldCollectionfield type. Front Mattter CMS will then automatically populate the content type with the fields you've defined in the field group.