2.0.2 • Published 6 years ago

vuepress-theme-momo v2.0.2

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

vuepress-theme-momo

Dreipols MOMO vuepress theme.

This is basically the default theme. The only difference is the SearchBox.vue component, which has been refactored to provide a better search implementation using lunr.js.

Usage

If you want to use this theme you have to set your theme to momo. In addition you need a search-documents property.

.vuepress/config.js

    module.exports = {
        title: name,
        theme: 'momo',
        themeConfig: {
            nav: ...,
            sidebar: ...,
            search: {
                ref: 'name',
                fields: ['content'],
                ui: {
                    link: 'link',
                    text: 'file',
                },
                documents: require('../app/search-documents.json'),
                index: require('../app/search-index.json'),
            },
        },
    };

Config

The search configuration has to look like this interface

    export default interface ConfigInterface{
        ref: string;
        fields: string[];
        ui: UIConfigInterface;
        documents: object[];
        index?: object;
        metadataComponent?: string;
    }
    
    export interface UIConfigInterface {
        link: string;
        text: string;
    }

Config Description

PropertyDescription
refDocument identifier for your document set. Like the ID
fieldsArray of fields that will be indexed
ui.linkDefine what property defines the link to the result
ui.textText that should be displayed for your result
documentsDocuments that will be indexed and available in your search
indexA serialized search index created by lunr
metadataComponentA component name that will be used to render the metadata content. Default

Pre-Built Lunr Index

Read here about prebuilding your index

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago