astro.config.ts 999 B

123456789101112131415161718192021222324252627282930313233
  1. import { defineConfig } from 'astro/config'
  2. import { bootstrap } from './src/libs/astro'
  3. import { getConfig } from './src/libs/config'
  4. import { algoliaPlugin } from './src/plugins/algolia-plugin'
  5. import { stackblitzPlugin } from './src/plugins/stackblitz-plugin'
  6. const isDev = process.env.NODE_ENV === 'development'
  7. const site = isDev
  8. ? // In development mode, use the local dev server.
  9. 'http://localhost:4321'
  10. : process.env.DEPLOY_PRIME_URL !== undefined
  11. ? // If deploying on Netlify, use the `DEPLOY_PRIME_URL` environment variable.
  12. process.env.DEPLOY_PRIME_URL
  13. : // Otherwise, use the `baseURL` value defined in the `config.yml` file.
  14. getConfig().baseURL
  15. // https://astro.build/config
  16. export default defineConfig({
  17. build: {
  18. assets: `docs/${getConfig().docs_version}/assets`
  19. },
  20. integrations: [bootstrap()],
  21. markdown: {
  22. smartypants: false,
  23. syntaxHighlight: 'prism'
  24. },
  25. site,
  26. vite: {
  27. plugins: [algoliaPlugin(), stackblitzPlugin()]
  28. }
  29. })