leo-buneev / vuepress-plugin-fulltext-search

Adds full-text search capabilities to your vuepress site with a help of flexsearch library.
MIT License
93 stars 23 forks source link

Getting error : Input data should be a String #8

Closed e0lithic closed 4 years ago

e0lithic commented 4 years ago

It seems that the plugin is failing at rendering the page. Here is the fail log

Error when applying fulltext-search plugin: Error: Input data should be a String
    at MarkdownIt.parse (/media/e0lithic/D/GameX/src_generic/release_tools/Test2/node_modules/markdown-it/lib/index.js:518:11)
    at MarkdownIt.render (/media/e0lithic/D/GameX/src_generic/release_tools/Test2/node_modules/markdown-it/lib/index.js:543:36)
    at MarkdownIt.md.render (/media/e0lithic/D/GameX/src_generic/release_tools/Test2/node_modules/@vuepress/markdown/index.js:141:25)
    at extendPageData (/media/e0lithic/D/GameX/src_generic/release_tools/Test2/node_modules/vuepress-plugin-fulltext-search/index.js:7:48)
    at /media/e0lithic/D/GameX/src_generic/release_tools/Test2/node_modules/@vuepress/core/lib/node/Page.js:293:19
    at Array.map (<anonymous>)
    at Page.enhance (/media/e0lithic/D/GameX/src_generic/release_tools/Test2/node_modules/@vuepress/core/lib/node/Page.js:290:17)
    at Page.process (/media/e0lithic/D/GameX/src_generic/release_tools/Test2/node_modules/@vuepress/core/lib/node/Page.js:148:16)
    at App.addPage (/media/e0lithic/D/GameX/src_generic/release_tools/Test2/node_modules/@vuepress/core/lib/node/App.js:354:16)
    at /media/e0lithic/D/GameX/src_generic/release_tools/Test2/node_modules/@vuepress/core/lib/node/App.js:120:20
    at Array.map (<anonymous>)
    at App.process (/media/e0lithic/D/GameX/src_generic/release_tools/Test2/node_modules/@vuepress/core/lib/node/App.js:119:65)
    at async dev (/media/e0lithic/D/GameX/src_generic/release_tools/Test2/node_modules/@vuepress/core/lib/index.js:17:3)

Could you please give me pointers on how to rectify it ?

e0lithic commented 4 years ago

The reason for this is that _strippedContent does not contain the YAML frontmatter.