Feedback: Clearing up possible confusion or typo for reusable data types #254

Closed
opened 2026-10-05 02:36:01 +02:00 by adam · 2 comments
Owner

I am pretty sure, that the first sample code in Re-using a data type for files or folders should be for frontmatter.data.types, not .files. Putting the type definitions into .types, then referencing them in .files[].type, right?


Document Details

⚠ Do not edit this section

I am pretty sure, that the first sample code in [Re-using a data type for files or folders](https://frontmatter.codes/docs/dashboard#re-using-a-data-type-for-files-or-folders) should be for `frontmatter.data.types`, not `.files`. Putting the type definitions into `.types`, then referencing them in `.files[].type`, right? --- #### Document Details ⚠ *Do not edit this section* * ID: dashboard * URL: https://frontmatter.codes/docs/dashboard * Content Source: /content/docs/dashboard.md <!-- github-sync-id:1201766493 -->
adam closed this issue 2026-10-05 02:36:02 +02:00
Author
Owner

The provided sample is correctly referenced. The frontMatter.data.files setting can hold the schema or can reuse a schema defined from frontMatter.data.types.

In the first example, we show how to include the schema for a specific file. The second one, is where you move the schema to the frontMatter.data.types and use it in the frontMatter.data.files by referencing the type property.

I'll add the frontMatter.data.types setting sample to the code sample to clarify this.

EDIT: Ok, you're right ☺️ - will update the setting reference.

~The provided sample is correctly referenced. The `frontMatter.data.files` setting can hold the schema or can reuse a schema defined from `frontMatter.data.types`.~ ~In the first example, we show how to include the schema for a specific file. The second one, is where you move the schema to the `frontMatter.data.types` and use it in the `frontMatter.data.files` by referencing the `type` property.~ ~I'll add the `frontMatter.data.types` setting sample to the code sample to clarify this.~ EDIT: Ok, you're right ☺️ - will update the setting reference. <!-- github-comment-id:1096684540 -->
Author
Owner

Updated and should be live in a minute. Thanks 🙏

Updated and should be live in a minute. Thanks 🙏 <!-- github-comment-id:1096688869 -->
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#254