Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yassilah/nuxt-crawler

Automatic crawler & search for Nuxt SSG.
https://github.com/yassilah/nuxt-crawler

algolia crawler nuxt search ssg

Last synced: 7 days ago
JSON representation

Automatic crawler & search for Nuxt SSG.

Awesome Lists containing this project

README

        

# Features

Automatically crawl and store metadata about your Nuxt generated pages into your Algolia index. Should work with Nuxt 2, Nuxt Bridge & Nuxt 3 🔥.

# Install

```bash
yarn add @yassidev/nuxt-crawler -D
# npm i @yassidev/nuxt-crawler -D
```

# Usage

Within your `nuxt.config` add the following:

```ts
// nuxt.config

export default {
buildModules: [
'@yassidev/nuxt-crawler'
],

crawler: {
fields?: ((route: string, html: string, meta: MetaData) => Partial) | (keyof MetaData)[], // default: ['title', 'description']
include?: ((route: string) => boolean) | (string | RegExp)[], // default: undefined
apiKey: string, // required
apiAdminKey: string, // required
appId: string, // required
indexName: string // required
}
}
```

# Typescript

ForTypescript support, add the module within your `tsconfig.json`:

```json
{
"compilerOptions": {
"types": [
"@yassidev/nuxt-crawler"
]
}
}
```
"compilerOptions": {