123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- import { resolve } from 'pathe'
- import { defineConfig } from 'vitepress'
- import { groupIconMdPlugin } from 'vitepress-plugin-group-icons'
- export const sharedConfig = defineConfig({
- title: 'TresJS',
- description: 'Declarative ThreeJS using Vue Components',
- head: [
- ['link', { rel: 'icon', type: 'image/svg', href: '/favicon.svg' }],
- ['meta', { name: 'theme-color', content: '#82DBC5' }],
- ['meta', { name: 'twitter:card', content: 'summary_large_image' }],
- ['meta', { name: 'twitter:site', content: '@tresjs_dev' }],
- ['meta', { name: 'twitter:creator', content: '@tresjs_dev' }],
- ['meta', { property: 'og:type', content: 'website' }],
- ['meta', { property: 'og:site_name', content: 'TresJS' }],
- [
- 'meta',
- {
- property: 'og:image',
- content: 'https://repository-images.githubusercontent.com/571314349/10996566-7f70-473b-a8e5-4e56fc0ca850',
- },
- ],
- [
- 'meta',
- {
- property: 'twitter:image',
- content: 'https://repository-images.githubusercontent.com/571314349/10996566-7f70-473b-a8e5-4e56fc0ca850',
- },
- ],
- ['script', { 'defer': 'true', 'data-domain': 'tresjs.org', 'src': 'https://plausible.io/js/script.js' }],
- ],
- themeConfig: {
- logo: '/logo.svg',
- search: {
- provider: 'local',
- options: {
- locales: {
- root: {
- translations: {
- button: {
- buttonText: 'Search',
- buttonAriaLabel: 'Search',
- },
- modal: {
- displayDetails: 'Display detailed list',
- resetButtonTitle: 'Reset search',
- backButtonTitle: 'Close search',
- noResultsText: 'No results for',
- footer: {
- selectText: 'to select',
- selectKeyAriaLabel: 'enter',
- navigateText: 'to navigate',
- navigateUpKeyAriaLabel: 'up arrow',
- navigateDownKeyAriaLabel: 'down arrow',
- closeText: 'to close',
- closeKeyAriaLabel: 'escape',
- },
- },
- },
- },
- },
- },
- },
- socialLinks: [
- { icon: 'github', link: 'https://github.com/tresjs/tres' },
- { icon: 'x', link: 'https://twitter.com/tresjs_dev' },
- { icon: 'discord', link: 'https://discord.gg/UCr96AQmWn' },
- ],
- },
- vite: {
- optimizeDeps: {
- exclude: ['vitepress'],
- include: ['@tresjs/cientos', '@stackblitz/sdk', '@vueuse/core', 'three'],
- },
- server: {
- hmr: {
- overlay: false,
- },
- },
- resolve: {
- alias: {
- '@tresjs/core': resolve(__dirname, '../../../dist/tres.js'),
- },
- dedupe: ['@tresjs/cientos', 'three'],
- },
- },
- vue: {
- template: {
- compilerOptions: {
- isCustomElement: tag => tag.startsWith('Tres') && tag !== 'TresCanvas',
- },
- },
- },
- markdown: {
- config: (md) => {
- md.use(groupIconMdPlugin)
- },
- },
- })
|