Home

Awesome

<p align="center"> <img src="https://raw.githubusercontent.com/meilisearch/integration-guides/main/assets/logos/meilisearch_vuepress.svg" alt="Meilisearch-VuePress" width="200" height="200" /> </p> <h1 align="center">DEPRECATED - Meilisearch VuePress</h1>

šŸšØ DEPRECATION WARNING šŸšØ

Dear Community,

We'd like to share some updates regarding the future maintenance of this repository:

Our team is small, and our availability will be reduced in the upcoming times. As such, we decided to deprecate this repository. This means we won't be updating the package to be compatible with VuePress v2.

We still accept bug fixes from the community but no more enhancements.

Seeking immediate support? Please join us on our Discord channel.


<h4 align="center"> <a href="https://github.com/meilisearch/meilisearch">Meilisearch</a> | <a href="https://www.meilisearch.com/pricing?utm_campaign=oss&utm_source=integration&utm_medium=vuepress-plugin-meilisearch">Meilisearch Cloud</a> | <a href="https://www.meilisearch.com/docs">Documentation</a> | <a href="https://discord.meilisearch.com">Discord</a> | <a href="https://roadmap.meilisearch.com/tabs/1-under-consideration">Roadmap</a> | <a href="https://www.meilisearch.com">Website</a> | <a href="https://www.meilisearch.com/docs/faq">FAQ</a> </h4> <p align="center"> <a href="https://www.npmjs.com/package/vuepress-plugin-meilisearch"><img src="https://img.shields.io/npm/v/vuepress-plugin-meilisearch.svg" alt="npm version"></a> <a href="https://github.com/meilisearch/vuepress-plugin-meilisearch/actions"><img src="https://github.com/meilisearch/vuepress-plugin-meilisearch/workflows/Tests/badge.svg" alt="GitHub Workflow Status"></a> <a href="https://github.com/meilisearch/vuepress-plugin-meilisearch/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-informational" alt="License"></a> <a href="https://ms-bors.herokuapp.com/repositories/46"><img src="https://bors.tech/images/badge_small.svg" alt="Bors enabled"></a> </p> <p align="center">āš” The Meilisearch plugin for VuePress</p>

Meilisearch VuePress is a Meilisearch plugin for VuePress.

Meilisearch is an open-source search engine. Discover what Meilisearch is!

If you don't use VuePress for your documentation, but you still need a search bar, you might check out this front-end SDK.

Table of Contents <!-- omit in toc -->

āš” Supercharge your Meilisearch experience

Say goodbye to server deployment and manual updates with Meilisearch Cloud. No credit card required.

Usage

Before using the plugin

The goal of this plugin is to provide very easy integration of a search bar into your own VuePress documentation. To make that possible, you need to gather your website content in advance, and index it in a Meilisearch instance.

Luckily, we provide all the tools that you need, and can help you through the whole process, if you follow this guide šŸš€

As a first introduction, you might only want to test this plugin without connecting it to your website.<br> You can do it by running the VuePress playground provided in this repository:

yarn install
yarn playground

Then, open your browser on the indicated URL and test the search bar šŸ™‚

The data comes from Meilisearch documentation.<br> Type create an indxe to live the Meilisearch experience with the typo tolerance.

Installation

In your VuePress project:

yarn add vuepress-plugin-meilisearch
# or
npm install vuepress-plugin-meilisearch

Basic Configuration

In your config.js file:

module.exports = {
  plugins: [
    [
      'vuepress-plugin-meilisearch',
      {
        hostUrl: 'https://mymeilisearch.com',
        apiKey: 'XXX',
        indexUid: 'docs'
      }
    ]
  ]
}

WARNING: Since the configuration file is public, we recommend providing the Meilisearch public key, which is enough to perform searches.<br> Read more about Meilisearch authentication.

Customization

module.exports = {
  plugins: [
    [
      'vuepress-plugin-meilisearch',
      {
        hostUrl: 'https://mymeilisearch.com', // Mandatory
        apiKey: 'XXX', // Mandatory
        indexUid: 'docs-test', // Mandatory
        placeholder: 'Search as you type...', // Default: ""
        maxSuggestions: 10, // Default: 5
        hotKeys: [], // Default: ['s', '/']
        cropLength: 50, // Default: 30
        layout: 'simple', // Default: "columns"
        debug: true, // Default: false
        enableDarkMode: 'auto' // Default: false
      }
    ]
  ]
}

Dark mode

You can enable dark mode by adding enableDarkMode: 'auto' to your configuration file.

To override the default theme of the search bar, you can edit your .vuepress/styles/palette.styl file.<br> A few variables are available:

$accentDarkColor
$inputDarkBgColor
$textDarkColor
$borderDarkColor
$dropdownBgDarkColor

You can also find an example in our playground's palette.styl file

Compatibility with Meilisearch

This package guarantees compatibility with version v1.x of Meilisearch, but some features may not be present. Please check the issues for more info.

Development Workflow and Contributing

Any new contribution is more than welcome in this project!

If you want to know more about the development workflow or want to contribute, please visit our contributing guidelines for detailed instructions!

Related Repositories

<hr>

Meilisearch provides and maintains many SDKs and Integration tools like this one. We want to provide everyone with an amazing search experience for any kind of project. If you want to contribute, make suggestions, or just know what's going on right now, visit us in the integration-guides repository.