Cleanup PageMeta
1 minute read
After adding new fields to PageMeta, several inconsistencies
remain between the interface, its consumers, and the runtime data flow. This
task addresses duplication, missing type connections, and stale patterns.
Issues
descriptionis defined inPageMetabut not wired through — pages still duplicate it in thePublicationmeta proppage-renderer.svelte.jsreadspageMetadataas untypedRecord<string, unknown>— should usePageMetaFeedIteminapp.d.tsduplicates fields fromPageMeta(tags, authors, cover) with slightly different typesPublication.svelteMetaConfig typedef duplicates fields that could come fromPageMetaPageModuleinterface (title, menuTitle) overlaps withPageMeta— consider removing it- The
coverfield is typed asunknowninPageMetabut has a specific shape inFeedItem
Tasks
- Wire
PageMeta.descriptionthrough Publication so pages don't need to pass it twice - Type
pageMetadatainpage-renderer.svelte.jsasPageMeta - Align
FeedItemcover type withPageMetacover type - Consider deriving
FeedItemfields fromPageMetausingPick - Remove
PageModuleif fully superseded byPageMeta - Add a shared cover image type to replace
unknown - Verify with
pnpm check
Read next