1
0

shared.ts 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. import { defineConfig } from 'vitepress'
  2. import { resolve } from 'pathe'
  3. export const sharedConfig = defineConfig({
  4. title: 'TresJS',
  5. description: 'Declarative ThreeJS using Vue Components',
  6. head: [
  7. ['link', { rel: 'icon', type: 'image/svg', href: '/favicon.svg' }],
  8. ['meta', { name: 'theme-color', content: '#82DBC5' }],
  9. ['meta', { name: 'twitter:card', content: 'summary_large_image' }],
  10. ['meta', { name: 'twitter:site', content: '@tresjs_dev' }],
  11. ['meta', { name: 'twitter:creator', content: '@tresjs_dev' }],
  12. ['meta', { property: 'og:type', content: 'website' }],
  13. ['meta', { property: 'og:site_name', content: 'TresJS' }],
  14. [
  15. 'meta',
  16. {
  17. property: 'og:image',
  18. content: 'https://repository-images.githubusercontent.com/571314349/10996566-7f70-473b-a8e5-4e56fc0ca850',
  19. },
  20. ],
  21. [
  22. 'meta',
  23. {
  24. property: 'twitter:image',
  25. content: 'https://repository-images.githubusercontent.com/571314349/10996566-7f70-473b-a8e5-4e56fc0ca850',
  26. },
  27. ],
  28. ['script', { 'defer': 'true', 'data-domain': 'tresjs.org', 'src': 'https://plausible.io/js/script.js' }],
  29. ],
  30. themeConfig: {
  31. logo: '/logo.svg',
  32. search: {
  33. provider: 'local',
  34. options: {
  35. locales: {
  36. root: {
  37. translations: {
  38. button: {
  39. buttonText: 'Search',
  40. buttonAriaLabel: 'Search',
  41. },
  42. modal: {
  43. displayDetails: 'Display detailed list',
  44. resetButtonTitle: 'Reset search',
  45. backButtonTitle: 'Close search',
  46. noResultsText: 'No results for',
  47. footer: {
  48. selectText: 'to select',
  49. selectKeyAriaLabel: 'enter',
  50. navigateText: 'to navigate',
  51. navigateUpKeyAriaLabel: 'up arrow',
  52. navigateDownKeyAriaLabel: 'down arrow',
  53. closeText: 'to close',
  54. closeKeyAriaLabel: 'escape',
  55. },
  56. },
  57. },
  58. },
  59. },
  60. },
  61. },
  62. socialLinks: [
  63. { icon: 'github', link: 'https://github.com/tresjs/tres' },
  64. { icon: 'x', link: 'https://twitter.com/tresjs_dev' },
  65. { icon: 'discord', link: 'https://discord.gg/UCr96AQmWn' },
  66. ],
  67. },
  68. vite: {
  69. optimizeDeps: {
  70. exclude: ['vitepress'],
  71. include: ['@tresjs/cientos', '@stackblitz/sdk', '@vueuse/core', 'three'],
  72. },
  73. server: {
  74. hmr: {
  75. overlay: false,
  76. },
  77. },
  78. resolve: {
  79. alias: {
  80. '@tresjs/core': resolve(__dirname, '../../../dist/tres.js'),
  81. },
  82. dedupe: ['@tresjs/cientos', 'three'],
  83. },
  84. },
  85. vue: {
  86. template: {
  87. compilerOptions: {
  88. isCustomElement: tag => tag.startsWith('Tres') && tag !== 'TresCanvas',
  89. },
  90. },
  91. },
  92. })