Piano notes book, powered by Astro and React.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

38 rivejä
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. });