Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ulu/vitepress-auto-menus

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ulu/vitepress-auto-menus - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

package.json
{
"name": "@ulu/vitepress-auto-menus",
"version": "0.0.1",
"version": "0.0.2",
"description": "Use to automatically populate the config with the page links (default theme nav, sidebar). Supports configuration, page weight for ordering. Page tree can be used independently for custom implementations or you can use the helper function toDefaultTheme to convert.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,6 +0,6 @@

# Vuepress Page Tree
# Vitepress Auto Menus
This plugin creates a page tree, used to automatically populate navigation in default theme. You pass it the source directory (docs directory), and it gives you back a tree. It then provides a function to map the tree to the default theme (what the config needs).
Children are mapped to the sidebar, if you want different menu structure for the navbar or sidebar, create it using from the output of `createTree`.
Children are mapped to the sidebar, if you want different menu structure for the nav or sidebar, create it using from the output of `createTree`.

@@ -10,24 +10,15 @@ ## Usage

```js
import { defineConfig } from 'vitepress';
import { resolve } from "path";
import { createTree, toDefaultTheme } from "@ulu/vitepress-auto-menus";
import { defineUserConfig } from "vuepress";
import { dirname, resolve } from "path";
import { fileURLToPath } from "url";
import { defaultTheme } from "@vuepress/theme-default";
import { createTree, toDefaultTheme } from "@ulu/vuepress-page-tree";
const pages = createTree({ source: resolve(__dirname, "../") });
const __dirname = dirname(fileURLToPath(import.meta.url));
const tree = createTree({
source: resolve(__dirname, "../")
});
export default defineUserConfig({
lang: "en-US",
title: "Test",
description: "Test",
theme: defaultTheme({
...toDefaultTheme(tree)
})
});
export default defineConfig({
title: "Test Plugin",
description: "Vitepress site for testing plugin",
themeConfig: {
...toDefaultTheme(pages),
}
})
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc