fix: hide legacy title chrome for frontmatter titles

This commit is contained in:
lucaronin
2026-04-09 12:51:06 +02:00
parent d13e181658
commit cb2e28f3d9
7 changed files with 199 additions and 31 deletions

View File

@@ -36,11 +36,11 @@ export function useEditorSaveWithLinks(config: {
const filename = path.split('/').pop() ?? path
const fmPatch = {
...frontmatterPatch,
...deriveDisplayTitleState(
...deriveDisplayTitleState({
content,
filename,
typeof frontmatterPatch.title === 'string' ? frontmatterPatch.title : null,
),
frontmatterTitle: typeof frontmatterPatch.title === 'string' ? frontmatterPatch.title : null,
}),
}
const fmKey = JSON.stringify(fmPatch)
if (fmKey !== prevFmKeyRef.current) {