Piano notes book, powered by Astro and React.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

38 行
827 B

  1. import { defineConfig } from 'astro/config';
  2. import tailwind from '@astrojs/tailwind';
  3. import mdx from '@astrojs/mdx';
  4. import AutoImport from 'astro-auto-import';
  5. const defaultLayoutPlugin = () => (tree, file) => {
  6. const path = file.history.at(-1).split('/').at(-1);
  7. file.data.astro.frontmatter.layout = (
  8. path.startsWith('index.')
  9. ? '../layouts/Cover.astro'
  10. : '../layouts/Default.astro'
  11. );
  12. };
  13. export default defineConfig({
  14. trailingSlash: 'never',
  15. output: 'static',
  16. build: {
  17. format: 'file',
  18. },
  19. compressHTML: false,
  20. markdown: {
  21. remarkPlugins: [defaultLayoutPlugin],
  22. extendDefaultPlugins: true,
  23. },
  24. integrations: [
  25. tailwind({
  26. applyBaseStyles: false,
  27. }),
  28. AutoImport({
  29. imports: [
  30. './src/components/Score.astro',
  31. ],
  32. }),
  33. mdx()
  34. ],
  35. });