Using Marked extensions to render extended markdown in Astro.
Let's just use this one.
- Pagefind (Fixed closing delimiter placement)
- PrismJS (Fixed closing delimiter placement)
- Stow (Fixed closing delimiter placement)
- Zustand (Fixed closing delimiter placement)
- Floorp (Fixed closing delimiter placement)
- Glarity (Fixed closing delimiter placement)
Using Marked extensions to render extended markdown in Astro.
Extension | Package | Example |
Admonition | marked-admonition-extension | !!! danger this is a danger type admonitiondanger type admonition |
Alert | marked-alert | > [!NOTE] |
Footnotes | marked-footnote | Here is a simple footnote[^1]. |
Custom Heading Id | marked-custom-heading-id | marked("# heading {#custom-id}"); |
JSX Renderer | marked-code-jsx-renderer |
The package.json for the site is now:
json
{
"name": "site",
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^4.2.1",
"@astrojs/node": "^9.1.3",
"astro": "^5.5.4",
"astro-icon": "^1.1.5",
"dotenv": "^16.3.1",
"glob": "^10.3.10",
"gray-matter": "^4.0.3",
"shiki": "^3.2.1",
"undici": "^5.28.2"
},
"devDependencies": {
"husky": "^9.1.7",
"marked-admonition-extension": "^0.0.4",
"marked-alert": "^2.1.2",
"marked-code-jsx-renderer": "^1.2.10",
"marked-custom-heading-id": "^2.0.14",
"marked-footnote": "^1.2.4",
"marked-sequential-hooks": "^1.2.2",
"ts-node": "^10.9.1",
"tsx": "^4.19.3",
"typescript": "^5.0.0",
"uuid": "^11.1.0"
},
"pnpm": {
"onlyBuiltDependencies": [
"esbuild",
"sharp"
]
}
}