Skip to content

Commit 9b05997

Browse files
Refactor blog structure and content management
- Removed the old hello-world post and replaced it with a new documentation structure. - Updated main layout to include meta description support. - Refactored post layout to utilize new content collections and rendering methods. - Deleted outdated post and index pages, replacing them with a new dynamic routing structure for posts. - Implemented a new content configuration file for managing post and documentation collections. - Added a new compilation principle post with detailed notes and structured content. - Enhanced TypeScript configuration for better path resolution.
1 parent 32ee69d commit 9b05997

17 files changed

Lines changed: 2651 additions & 1678 deletions

astro.config.mjs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,30 @@
11
import { defineConfig } from "astro/config";
2+
import mdx from "@astrojs/mdx";
23
import remarkMath from "remark-math";
34
import rehypeKatex from "rehype-katex";
45
import remarkToc from "remark-toc";
6+
import rehypePresetMinify from 'rehype-preset-minify';
57
import { rehypeAccessibleEmojis } from "rehype-accessible-emojis";
68

79
import tailwind from "@astrojs/tailwind";
810

9-
// https://astro.build/config
1011
export default defineConfig({
11-
integrations: [tailwind()],
12+
integrations: [
13+
tailwind(),
14+
mdx({
15+
syntaxHighlight: "shiki",
16+
shikiConfig: { theme: "dracula" },
17+
remarkPlugins: [remarkToc],
18+
rehypePlugins: [rehypePresetMinify],
19+
remarkRehype: { footnoteLabel: "Footnotes" },
20+
gfm: false,
21+
}),
22+
],
1223
markdown: {
24+
layouts: {
25+
"src/content/**/*.md": "src/layouts/post.astro",
26+
"src/pages/**/*.mdx": "src/layouts/post.astro",
27+
},
1328
remarkPlugins: [remarkMath, [remarkToc, { heading: "toc", maxDepth: 5 }]],
1429
rehypePlugins: [rehypeKatex, rehypeAccessibleEmojis],
1530
},

0 commit comments

Comments
 (0)