Enhancement: Add reusable fields for content types like data types #390

Open
opened 2026-10-05 02:44:38 +02:00 by adam · 0 comments
Owner

Is your feature request related to a problem? Please describe.

While I can use frontMatter.data.types to add reusable type definitions for data files and folders, I don't see a similar mechanism for defining the fields of content types. For example, my project uses Hugo, which means that in addition to any theme-specific metadata for a content type, I may want to include some or all of the available hugo metadata types.

Without a way to define a field for re-use, I have to re-define the fields for each content type.

Describe the solution you'd like

A new key, like frontMatter.taxonomy.fields for defining reusable fields and a new key in instances of frontMatter.taxonomy.contentTypes, like field (though possibly confusing with field) for referencing a defined field.

Describe alternatives you've considered

The only option I see at the moment is to maintain duplicate field definitions across my content types.

Additional context

N/A

**Is your feature request related to a problem? Please describe.** While I can use `frontMatter.data.types` to add reusable type definitions for data files and folders, I don't see a similar mechanism for defining the fields of content types. For example, my project uses Hugo, which means that in addition to any theme-specific metadata for a content type, I may want to include some or all of the available hugo metadata types. Without a way to define a field for re-use, I have to re-define the fields for each content type. **Describe the solution you'd like** A new key, like `frontMatter.taxonomy.fields` for defining reusable fields and a new key in instances of `frontMatter.taxonomy.contentTypes`, like `field` (though possibly confusing with `field`) for referencing a defined field. **Describe alternatives you've considered** The only option I see at the moment is to maintain duplicate field definitions across my content types. **Additional context** N/A <!-- github-sync-id:1534812530 -->
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#390