Summary
parseMarkdown (src/core/markdown.ts) and importFromContent (src/core/import-file.ts) assume frontmatter title, type, and slug are strings and cast them with as string. When a page carries a non-string frontmatter value — e.g. a numeric title from a structured JSON import — the unchecked cast lets the wrong type flow into page typing and the content-sanity title check.
Expected
Non-string frontmatter values are coerced to a string (or ignored in favor of the path-derived inference) rather than propagated as the wrong type.
Fix
Defensive coercion in both functions. PR incoming.
Summary
parseMarkdown(src/core/markdown.ts) andimportFromContent(src/core/import-file.ts) assume frontmattertitle,type, andslugare strings and cast them withas string. When a page carries a non-string frontmatter value — e.g. a numerictitlefrom a structured JSON import — the unchecked cast lets the wrong type flow into page typing and the content-sanity title check.Expected
Non-string frontmatter values are coerced to a string (or ignored in favor of the path-derived inference) rather than propagated as the wrong type.
Fix
Defensive coercion in both functions. PR incoming.