0.2.4 • Published 7 months ago

vuepress-barista v0.2.4

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

vuepress-barista

A vuepress 2.x sidebar generator inspired by vuepress-bar.

Usage

.vuepress/config.ts

import { defaultTheme } from "@vuepress/theme-default";
import getConfig from "vuepress-barista";

/**
 * @param path Path to directory with markdown files
 *        relative to vuepress' current working directory. 
 *        Should be '.' or './' in most setups.
 * @param opts Options.
 */
const { sidebar } = getConfig("./", {
  stripNumbers: true,
  capitalizeWords: true,
  maxLevel: 2
});

export default {
  title: 'VuePress 2.x Website',
  description: 'Vuepress 2.x site with auto-generated sidebar',
  theme: defaultTheme({ sidebar })
}

Options

ParamTypeDefaultDescription
capitalizeWordsbooleanfalseCapitalize words derived from all-lowercase directory or filenames. When false uses directory or filename spelling.
stripNumbersbooleantrueRemove number prefixes from directory names where it helps sorting.
maxLevelnumber2Maximum level of recursion for subdirectory traversing.
filterfunction(i: SidebarItem): booleanFilter function to filter files.
0.2.4

7 months ago

0.2.3

7 months ago

0.2.2

7 months ago

0.2.1

7 months ago

0.2.0

8 months ago

0.1.2

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago