Skip to content

Commit

Permalink
docs: update VP theme configuration (#6051)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin authored Jul 8, 2024
1 parent 1b150a3 commit 8c03598
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
6 changes: 3 additions & 3 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }],
Expand Down Expand Up @@ -139,7 +139,7 @@ export default ({ mode }: { mode: string }) => {
link: releases,
},
{
text: 'Contributing ',
text: 'Contributing',
link: contributing,
},
],
Expand Down
16 changes: 7 additions & 9 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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
1 change: 1 addition & 0 deletions docs/guide/browser/context.md
Original file line number Diff line number Diff line change
Expand Up @@ -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[],
Expand Down
2 changes: 1 addition & 1 deletion docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"lib": ["DOM", "ESNext"],
"baseUrl": ".",
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "Bundler",
"paths": {
"~/*": ["src/*"]
},
Expand Down

0 comments on commit 8c03598

Please sign in to comment.