1
0

config.ts 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. import Unocss from 'unocss/vite'
  2. import svgLoader from 'vite-svg-loader'
  3. import { defineConfig } from 'vitepress'
  4. import { resolve } from 'pathe'
  5. export default defineConfig({
  6. title: 'TresJS',
  7. description: 'Declarative ThreeJS using Vue Components',
  8. head: [['link', { rel: 'icon', type: 'image/svg', href: '/favicon.svg' }]],
  9. themeConfig: {
  10. logo: '/logo.svg',
  11. sidebar: [
  12. {
  13. text: 'Guide',
  14. items: [
  15. // This shows `/guide/index.md` page.
  16. { text: 'Introduction', link: '/guide/' },
  17. { text: 'Getting Started', link: '/guide/getting-started' },
  18. { text: 'Your first Scene', link: '/guide/your-first-scene' },
  19. { text: 'Migrate from v1', link: '/guide/migration-guide' },
  20. ],
  21. },
  22. {
  23. text: 'API',
  24. items: [
  25. { text: 'Renderer', link: '/api/renderer' },
  26. {
  27. text: 'Instances, arguments and props',
  28. link: '/api/instances-arguments-and-props',
  29. },
  30. {
  31. text: 'Composables',
  32. link: '/api/composables',
  33. },
  34. {
  35. text: 'Events',
  36. link: '/api/events',
  37. },
  38. ],
  39. },
  40. {
  41. text: 'Examples',
  42. items: [
  43. { text: 'Orbit Controls', link: '/examples/orbit-controls' },
  44. { text: 'Basic Animations', link: '/examples/basic-animations' },
  45. { text: 'Groups', link: '/examples/groups' },
  46. { text: 'Load Textures', link: '/examples/load-textures' },
  47. { text: 'Load Models', link: '/examples/load-models' },
  48. { text: 'Load Text', link: '/examples/text-3d' },
  49. ],
  50. },
  51. {
  52. text: 'Advanced',
  53. items: [
  54. { text: 'Extending', link: '/advanced/extending' },
  55. {
  56. text: 'Caveats',
  57. link: '/advanced/caveats',
  58. },
  59. ],
  60. },
  61. ],
  62. nav: [
  63. { text: 'Guide', link: '/guide/' },
  64. { text: 'API', link: '/api/renderer' },
  65. /* { text: 'API', link: '/api/' },
  66. { text: 'Config', link: '/config/' }, */
  67. /* {
  68. text: 'Ecosystem',
  69. activeMatch: `^/ecosystem/`,
  70. items: [
  71. {
  72. text: `Core v${version}`,
  73. items: [
  74. {
  75. text: 'Release Notes ',
  76. link: `https://github.com/Tresjs/tres/releases/tag/%40tresjs%2Fcore%40${version}`,
  77. },
  78. ],
  79. },
  80. {
  81. text: `Cientos v${cientosVersion}`,
  82. items: [
  83. {
  84. text: 'Release Notes ',
  85. link: `https://github.com/Tresjs/tres/releases/tag/%40tresjs%2Fcientos%40${cientosVersion}`,
  86. },
  87. ],
  88. },
  89. ],
  90. }, */
  91. ],
  92. socialLinks: [
  93. /* { icon: 'github', link: 'https://github.com/tresjs/tres' }, */
  94. { icon: 'twitter', link: 'https://twitter.com/alvarosabu' },
  95. { icon: 'discord', link: 'https://discord.gg/wXx63MwW'}
  96. ],
  97. },
  98. vite: {
  99. plugins: [svgLoader(), Unocss()],
  100. resolve: {
  101. alias: {
  102. '/@': resolve(__dirname, '../../src'),
  103. }
  104. }
  105. },
  106. })