This likely means 2 different parts of change, first when indexing content, it will need to differentiate heading (e.g. AST type: "element" andtagName: "h1") vs other content
I'm not sure how to deal with getting correct id, given computing id from heading is not enough given potential collision. This could mean a different lifecycle method is needed for this to work?
Currently the plugin produces a search index with all content on a page as string for a route.
https://github.com/jpmorganchase/mosaic/blob/73799275cb0e57fdc4e161a2a7676f6427e78724/packages/store/src/types/searchIndex.ts#L1-L5
This doesn't allow the use case to search for specific page section heading and navigate to it.
Potential solution - it may mean a similar data like below
This likely means 2 different parts of change, first when indexing content, it will need to differentiate heading (e.g. AST
type: "element"
andtagName: "h1"
) vs other contenthttps://github.com/jpmorganchase/mosaic/blob/73799275cb0e57fdc4e161a2a7676f6427e78724/packages/plugins/src/SearchIndexPlugin.ts#L114-L127
I'm not sure how to deal with getting correct
id
, given computingid
fromheading
is not enough given potential collision. This could mean a different lifecycle method is needed for this to work?