-
Notifications
You must be signed in to change notification settings - Fork 0
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
b03bf12
commit 3f6713e
Showing
11 changed files
with
972 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,3 +54,6 @@ coverage | |
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
docs/.vitepress/dist | ||
docs/.vitepress/cache |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
![nuxt-orama](./docs/cover.png) | ||
![nuxt-orama](./docs/public/cover.png) | ||
|
||
# Nuxt Orama | ||
|
||
|
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,31 @@ | ||
import { defineConfig } from 'vitepress' | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default defineConfig({ | ||
title: "NuxtOrama", | ||
description: "Orama Search Module for Nuxt3", | ||
head: [ | ||
['link', { rel: 'icon', href: '/nuxt-orama-logo.svg' }] | ||
], | ||
themeConfig: { | ||
// https://vitepress.dev/reference/default-theme-config | ||
nav: [ | ||
{ text: 'Home', link: '/' }, | ||
{ text: 'Docs', link: '/getting-started' } | ||
], | ||
logo: { src: '/nuxt-orama-logo.svg' }, | ||
sidebar: [ | ||
{ | ||
items: [ | ||
{ text: 'Getting Started', link: '/getting-started' }, | ||
{ text: 'Configuration', link: '/configuration' }, | ||
{ text: 'Usage', link: '/usage' }, | ||
] | ||
} | ||
], | ||
|
||
socialLinks: [ | ||
{ icon: 'github', link: 'https://github.com/amandesai01/nuxt-orama' } | ||
] | ||
} | ||
}) |
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,3 @@ | ||
:::info | ||
🚧 WIP | ||
::: |
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 @@ | ||
# Getting Started | ||
|
||
## Introduction | ||
|
||
`nuxt-orama` is a powerful Nuxt3 module designed to effortlessly integrate [OramaSearch](https://oramasearch.com) into your projects. It provides access to the Orama instance throughout your application. It is even possible to create multiple schemas (instances). | ||
|
||
## Quick Start | ||
|
||
### Install `nuxt-orama` | ||
|
||
::: code-group | ||
```sh [npm] | ||
$ npm install nuxt-orama | ||
``` | ||
```sh [yarn] | ||
$ yarn add nuxt-orama | ||
``` | ||
::: | ||
|
||
### Enable the module in your Nuxt configuration | ||
|
||
```Js | ||
export default defineNuxtConfig({ | ||
modules: ['nuxt-orama'], | ||
orama: { | ||
schemas: [ | ||
{ | ||
schema: { | ||
// your schema | ||
}, | ||
id: 'unique-key-to-access-later' // defaults to `default` | ||
} | ||
] | ||
} | ||
}) | ||
``` | ||
::: tip | ||
You can find more about configuring `nuxt-orama` [here](/configuration). | ||
::: | ||
|
||
### Use it in your application | ||
```vue | ||
<script setup lang='ts'> | ||
const { search, searchResults } = useOramaSearch('unique-key-added-before'); | ||
const searchInput = ref(''); | ||
watchEffect(() => { | ||
search({ | ||
term: searchInput.value | ||
}) | ||
}); | ||
</script> | ||
<template> | ||
<div> | ||
<input v-model="searchInput" type="text" /> | ||
{{ searchResults }} | ||
</div> | ||
</template> | ||
``` |
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,53 @@ | ||
--- | ||
# https://vitepress.dev/reference/default-theme-home-page | ||
layout: home | ||
|
||
hero: | ||
name: NuxtOrama | ||
text: Orama Search Module for Nuxt3 | ||
tagline: Build type-ahead search in Nuxt3 apps within minutes. | ||
actions: | ||
- theme: brand | ||
text: Getting Started | ||
link: /getting-started | ||
- theme: alt | ||
text: View on Github | ||
link: https://github.com/amandesai01/nuxt-orama | ||
image: | ||
src: /nuxt-orama-logo.svg | ||
alt: NuxtOrama's Logo | ||
|
||
features: | ||
- title: Get Started in Minutes | ||
icon: ⚡️ | ||
details: It takes hardly a minute to configure nuxt-orama, and 5 minutes to integrate into your application. | ||
- title: Handy Composables | ||
icon: 💼 | ||
details: Handy composables for all functions, wrapped with refs to seamlessly integrate with your components. | ||
- title: Manage Multiple Schemas | ||
icon: 🪢 | ||
details: Easily manage multiple schemas and search instances throughout your application. | ||
--- | ||
|
||
|
||
<style> | ||
:root { | ||
--vp-home-hero-name-color: transparent; | ||
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #bd34fe 30%, #41d1ff); | ||
|
||
--vp-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #47caff 50%); | ||
--vp-home-hero-image-filter: blur(44px); | ||
} | ||
|
||
@media (min-width: 640px) { | ||
:root { | ||
--vp-home-hero-image-filter: blur(56px); | ||
} | ||
} | ||
|
||
@media (min-width: 960px) { | ||
:root { | ||
--vp-home-hero-image-filter: blur(68px); | ||
} | ||
} | ||
</style> |
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,11 @@ | ||
# Usage | ||
|
||
:::info | ||
🚧 WIP | ||
::: | ||
|
||
This module exposes composables that are auto-imported by Nuxt 3. | ||
|
||
## `useOramaInstance()` | ||
|
||
## `useOramaSearch()` |
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
Oops, something went wrong.