diff --git a/README.md b/README.md index 4e333b0..f36e70d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # vuepress-plugin-flexsearch + Next-Generation full text search library for Vuepress diff --git a/index.js b/index.js new file mode 100644 index 0000000..bd78c14 --- /dev/null +++ b/index.js @@ -0,0 +1,10 @@ +const removeMarkdown = require('remove-markdown') + +module.exports = () => ({ + extendPageData ($page) { + const { + _content + } = $page + $page.content = removeMarkdown(_content) + } +}) \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..c0985a0 --- /dev/null +++ b/package.json @@ -0,0 +1,29 @@ +{ + "name": "vuepress-plugin-flexsearch", + "version": "0.0.1", + "description": "Next-Generation full text search library for Vuepress", + "main": "index.js", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/z3by/vuepress-plugin-flexsearch", + "directory": "packages/vuepress-plugin-flexsearch" + }, + "keywords": [ + "documentation", + "vue", + "vuepress", + "generator", + "search", + "vuepress-plugin" + ], + "author": "z3by ", + "license": "MIT", + "homepage": "https://github.com/z3by/vuepress-plugin-flexsearch#readme", + "dependencies": { + "flexsearch": "nextapps-de/flexsearch", + "remove-markdown": "^0.3.0" + } +} diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..499cfaf --- /dev/null +++ b/yarn.lock @@ -0,0 +1,12 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +flexsearch@nextapps-de/flexsearch: + version "0.6.32" + resolved "https://codeload.github.com/nextapps-de/flexsearch/tar.gz/f01f05e5683d8db644241ff0e27555207084ec07" + +remove-markdown@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/remove-markdown/-/remove-markdown-0.3.0.tgz#5e4b667493a93579728f3d52ecc1db9ca505dc98" + integrity sha1-XktmdJOpNXlyjz1S7MHbnKUF3Jg=