Sidebar Example: sidebarGroupTemplate
This is a custom sidebar example generated from the following code:
js
import { defineConfig } from 'vitepress'
import { useSidebar } from 'vitepress-openapi'
import spec from '../docs/public/openapi.json'
export default defineConfig({
lang: 'en-US',
title: 'VitePress OpenAPI',
description: 'Generate VitePress API Docs from OpenAPI specifications',
themeConfig: {
sidebar: sidebar.itemsByPaths({
linkPrefix: "#",
sidebarGroupTemplate: (path, _) => {
return `<span>${path}</span>`;
}
}),
},
})