-
-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e5d060d
commit 79ec043
Showing
10 changed files
with
305 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
outline: deep | ||
--- | ||
|
||
# Plugin Vitepress | ||
|
||
Vitepress is a Vite & Vue powered static site generator. | ||
|
||
The website you're visiting right now is built with Vitepress and uses the official Orama Vitepress Plugin for search! | ||
|
||
## Installation | ||
|
||
You can install the plugin using any major Node.js package manager: | ||
|
||
```bash copy | ||
npm install @orama/plugin-vitepress | ||
``` | ||
|
||
## Usage | ||
|
||
This plugin will look for all the `.md` files in your documentation directory and will automatically index them for you. | ||
|
||
After the installation via the package manager of your choice, you can import the plugin in your `.vitepress/config.js` file: | ||
|
||
```js | ||
import { OramaPlugin } from '@orama/plugin-nextra' | ||
|
||
export default { | ||
// ... | ||
vite: { | ||
plugins: [OramaPlugin()], | ||
}, | ||
// ... | ||
} | ||
``` | ||
|
||
And that's it! The Orama plugin will do the rest for you. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Vitepress Plugin | ||
|
||
[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml) | ||
|
||
Official plugin to provide search capabilities through Orama on any Vitepress website! | ||
|
||
# Usage | ||
|
||
For the complete usage guide, please refer to the [official plugin documentation](https://docs.oramasearch.com/open-source/plugins/plugin-vitepress). | ||
|
||
# TL;DR | ||
|
||
```js | ||
// .vitepress/config.js | ||
|
||
import { defineConfig } from 'vitepress' | ||
import { OramaPlugin } from '@orama/plugin-vitepress' | ||
|
||
export default defineConfig({ | ||
// ... | ||
vite: { | ||
plugins: [OramaPlugin()] | ||
}, | ||
// ... | ||
}) | ||
``` | ||
|
||
# License | ||
|
||
[Apache-2.0](/LICENSE.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"name": "@orama/plugin-vitepress", | ||
"version": "2.0.0-beta.8", | ||
"description": "Vitepress plugin for local search powered by orama", | ||
"keywords": [ | ||
"orama", | ||
"vite", | ||
"vitepress", | ||
"vue" | ||
], | ||
"license": "Apache-2.0", | ||
"main": "./dist/index.js", | ||
"type": "module", | ||
"bugs": { | ||
"url": "https://github.com/oramasearch/orama/issues" | ||
}, | ||
"homepage": "https://github.com/oramasearch/orama#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/oramasearch/orama.git" | ||
}, | ||
"sideEffects": false, | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "swc --delete-dir-on-start --extensions .ts -d dist src", | ||
"postbuild": "tsc -p . --emitDeclarationOnly && cp ./src/Search.vue ./dist/Search.vue", | ||
"lint": "eslint src --ext .js,.ts,.cts" | ||
}, | ||
"dependencies": { | ||
"@orama/orama": "workspace:*", | ||
"@orama/plugin-data-persistence": "workspace:*", | ||
"@orama/searchbox": "1.0.0-beta.9", | ||
"@vitejs/plugin-vue": "^4.5.1", | ||
"jsdom": "^23.0.1", | ||
"markdown-it": "^13.0.2", | ||
"slugify": "^1.6.6", | ||
"vite": "^4.1.4" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"lint-staged": { | ||
"*.{ts, tsx}": "eslint ./src --cache --fix" | ||
}, | ||
"devDependencies": { | ||
"@swc/cli": "^0.1.59", | ||
"@swc/core": "^1.3.27", | ||
"@preact/signals-core": "^1.5.0", | ||
"@types/jsdom": "^21.1.6", | ||
"@types/markdown-it": "^13.0.7", | ||
"typescript": "^5.0.0", | ||
"vitepress": "1.0.0-rc.31" | ||
}, | ||
"peerDependencies": { | ||
"vue": "^3.0.0" | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"target": "ES5", | ||
"module": "NodeNext", | ||
"outDir": "dist", | ||
"jsx": "react", | ||
"noImplicitAny": false, | ||
"lib": ["ESNext", "DOM", "DOM.Iterable"], | ||
"esModuleInterop": true, | ||
"declaration": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"resolveJsonModule": true, | ||
"sourceMap": true, | ||
"moduleResolution": "nodenext" | ||
}, | ||
"include": ["src/*.ts"] | ||
} |
Oops, something went wrong.