mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
docs: update VP theme configuration (#6051)
This commit is contained in:
parent
1b150a3891
commit
8c035988be
@ -37,8 +37,8 @@ export default ({ mode }: { mode: string }) => {
|
||||
},
|
||||
head: [
|
||||
['meta', { name: 'theme-color', content: '#729b1a' }],
|
||||
['link', { rel: 'icon', href: '/favicon.ico', sizes: 'any' }],
|
||||
['link', { rel: 'icon', href: '/logo.svg', type: 'image/svg+xml' }],
|
||||
['link', { rel: 'icon', href: '/favicon.ico', sizes: '48x48' }],
|
||||
['link', { rel: 'icon', href: '/logo.svg', sizes: 'any', type: 'image/svg+xml' }],
|
||||
['meta', { name: 'author', content: `${teamMembers.map(c => c.name).join(', ')} and ${vitestName} contributors` }],
|
||||
['meta', { name: 'keywords', content: 'vitest, vite, test, coverage, snapshot, react, vue, preact, svelte, solid, lit, marko, ruby, cypress, puppeteer, jsdom, happy-dom, test-runner, jest, typescript, esm, tinypool, tinyspy, node' }],
|
||||
['meta', { property: 'og:title', content: vitestName }],
|
||||
@ -139,7 +139,7 @@ export default ({ mode }: { mode: string }) => {
|
||||
link: releases,
|
||||
},
|
||||
{
|
||||
text: 'Contributing ',
|
||||
text: 'Contributing',
|
||||
link: contributing,
|
||||
},
|
||||
],
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { h } from 'vue'
|
||||
import Theme, { VPBadge } from 'vitepress/theme'
|
||||
import type { EnhanceAppContext } from 'vitepress'
|
||||
import type { Theme } from 'vitepress'
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import { inBrowser } from 'vitepress'
|
||||
import '../style/main.css'
|
||||
import '../style/vars.css'
|
||||
@ -15,16 +15,14 @@ if (inBrowser) {
|
||||
}
|
||||
|
||||
export default {
|
||||
...Theme,
|
||||
extends: DefaultTheme,
|
||||
Layout() {
|
||||
return h(Theme.Layout, null, {
|
||||
return h(DefaultTheme.Layout, null, {
|
||||
'home-features-after': () => h(HomePage),
|
||||
})
|
||||
},
|
||||
enhanceApp({ app }: EnhanceAppContext) {
|
||||
// Vitepress v1+ doesn't seem to expose it as a global "Badge"
|
||||
app.component('Badge', VPBadge)
|
||||
enhanceApp({ app }) {
|
||||
app.component('Version', Version)
|
||||
app.use(TwoslashFloatingVue as any)
|
||||
app.use(TwoslashFloatingVue)
|
||||
},
|
||||
}
|
||||
} satisfies Theme
|
||||
|
||||
@ -41,6 +41,7 @@ export const userEvent: {
|
||||
setup: () => UserEvent
|
||||
click: (element: Element, options?: UserEventClickOptions) => Promise<void>
|
||||
dblClick: (element: Element, options?: UserEventDoubleClickOptions) => Promise<void>
|
||||
tripleClick: (element: Element, options?: UserEventTripleClickOptions) => Promise<void>
|
||||
selectOptions: (
|
||||
element: Element,
|
||||
values: HTMLElement | HTMLElement[] | string | string[],
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"lib": ["DOM", "ESNext"],
|
||||
"baseUrl": ".",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"moduleResolution": "Bundler",
|
||||
"paths": {
|
||||
"~/*": ["src/*"]
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user