fix: preserve value types in extraFields (no string coercion)
CI / typecheck + build (turbo) (push) Canceled after 0s
CI / typecheck + build (turbo) (push) Canceled after 0s
- DocumentMeta.extraFields type -> Record<string, unknown> - API routes pass extraFields through without JSON.stringify coercion - CustomFieldBadges auto-styles by value type/content (number->purple, boolean->green/red, etc.) - DocForm help text: generic (no hardcoded field examples)
This commit is contained in:
@@ -16,7 +16,8 @@ export interface DocumentMeta {
|
||||
updatedAt: string; // ISO
|
||||
// Dynamic custom frontmatter fields (e.g. CTF: event, challenge, category,
|
||||
// difficulty, points). Content creators add arbitrary key-value pairs.
|
||||
extraFields?: Record<string, string>;
|
||||
// Values can be strings, numbers, booleans, arrays, or objects.
|
||||
extraFields?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface Document extends DocumentMeta {
|
||||
|
||||
Reference in New Issue
Block a user