From 14f2a6a3cf259165fbab3f8a94b9aa45314cc20b Mon Sep 17 00:00:00 2001 From: z3by Date: Tue, 14 Jan 2020 22:49:14 +0200 Subject: [PATCH] =?UTF-8?q?init=20plugin=20=F0=9F=8F=84=F0=9F=8F=BB?= =?UTF-8?q?=E2=80=8D=E2=99=80=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + index.js | 10 ++++++++++ package.json | 29 +++++++++++++++++++++++++++++ yarn.lock | 12 ++++++++++++ 4 files changed, 52 insertions(+) create mode 100644 index.js create mode 100644 package.json create mode 100644 yarn.lock 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=