Skip to content

Commit

Permalink
removed astro config file flattern config out
Browse files Browse the repository at this point in the history
  • Loading branch information
David Boyne authored and David Boyne committed Jul 19, 2024
1 parent a743d8c commit cfc01e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
21 changes: 3 additions & 18 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@ import { defineConfig } from 'astro/config';
import tailwind from '@astrojs/tailwind';
import mdx from '@astrojs/mdx';
import react from '@astrojs/react';
// import { rehypeHeadingIds } from '@astrojs/markdown-remark';
// import rehypeMinifyHtml from 'rehype-minify-html';
import rehypeSlug from 'rehype-slug';
import remarkGFM from 'remark-gfm';
import pagefind from "astro-pagefind";
import { mermaid } from "./src/remark-plugins/mermaid"

import expressiveCode from 'astro-expressive-code';
/** @type {import('bin/eventcatalog.config').Config} */
import config from './eventcatalog.config';

import expressiveCode from 'astro-expressive-code';

// https://astro.build/config
export default defineConfig({
Expand All @@ -31,23 +26,13 @@ export default defineConfig({
react(),
tailwind(),
expressiveCode({
// themes: ['github-light'],
themes: ['github-light'],
}),

mdx({
optimize: config.astro?.mdxOptimize || false,
// rehypePlugins: [rehypeMinifyHtml],
// syntaxHighlight: 'shiki',
// shikiConfig: {
// theme: 'github-light',
// langs: ['yaml']
// },

// https://docs.astro.build/en/guides/integrations-guide/mdx/#optimize
optimize: config.mdxOptimize || false,
remarkPlugins: [mermaid],
// remarkRehype: {
// footnoteLabel: 'Footnotes',
// },
gfm: false,
}),
pagefind(),
Expand Down
6 changes: 1 addition & 5 deletions bin/eventcatalog.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ type SideBarConfig = {
visible: boolean;
};

export type AstroConfig = {
mdxOptimize?: boolean;
};

export interface Config {
title: string;
tagline: false;
Expand All @@ -20,7 +16,7 @@ export interface Config {
src: string;
text?: string;
};
astro?: AstroConfig;
mdxOptimize?: boolean;
docs: {
sidebar: {
showPageHeadings: true;
Expand Down

0 comments on commit cfc01e9

Please sign in to comment.