import { defineConfig } from 'vitepress' import { search as zhSearch } from './zh' export const shared = defineConfig({ title: 'VitePress', lastUpdated: true, cleanUrls: true, markdown: { math: true, codeTransformers: [ // We use `[!!code` in demo to prevent transformation, here we revert it back. { postprocess(code) { return code.replace(/\[\!\!code/g, '[!code') } } ] }, sitemap: { hostname: 'https://vitepress.dev', transformItems(items) { return items.filter((item) => !item.url.includes('migration')) } }, /* prettier-ignore */ head: [ ['link', { rel: 'icon', type: 'image/svg+xml', href: '/vitepress-logo-mini.svg' }], ['link', { rel: 'icon', type: 'image/png', href: '/vitepress-logo-mini.png' }], ['meta', { name: 'theme-color', content: '#5f67ee' }], ['meta', { name: 'og:type', content: 'website' }], ['meta', { name: 'og:locale', content: 'en' }], ['meta', { name: 'og:site_name', content: 'VitePress' }], ['meta', { name: 'og:image', content: 'https://vitepress.dev/vitepress-og.jpg' }], ['script', { src: 'https://cdn.usefathom.com/script.js', 'data-site': 'AZBRSFGG', 'data-spa': 'auto', defer: '' }] ], themeConfig: { logo: { src: '/vitepress-logo-mini.svg', width: 24, height: 24 }, socialLinks: [ { icon: 'github', link: 'https://github.com/vuejs/vitepress' } ], search: { provider: 'algolia', options: { appId: '8J64VVRP8K', apiKey: 'a18e2f4cc5665f6602c5631fd868adfd', indexName: 'vitepress', locales: { ...zhSearch } } }, carbonAds: { code: 'CEBDT27Y', placement: 'vuejsorg' } } })