mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
679d4395ec
* Re-add smartypants * Updated packages * Remove all the default plugins if there are either remark or rehype plugins * Replace deperecated remark-slug with rehype-slug * Added MarkdownParserResponse type * Update documentation * Removed type import from markdown package * Updated remark-smartypants * Changelog * Missed one change * Split changelogs * Upgraded some MDX dependencies * Fix typos in documentation * Changed CHANGELOG.md package name * Renamed smartypants
27 lines
917 B
JavaScript
27 lines
917 B
JavaScript
// Full Astro Configuration API Documentation:
|
|
// https://docs.astro.build/reference/configuration-reference
|
|
|
|
// @type-check enabled!
|
|
// VSCode and other TypeScript-enabled text editors will provide auto-completion,
|
|
// helpful tooltips, and warnings if your exported object is invalid.
|
|
// You can disable this by removing "@ts-check" and `@type` comments below.
|
|
import astroRemark from '@astrojs/markdown-remark';
|
|
|
|
// @ts-check
|
|
export default /** @type {import('astro').AstroUserConfig} */ ({
|
|
// Enable Custom Markdown options, plugins, etc.
|
|
markdownOptions: {
|
|
render: [
|
|
astroRemark,
|
|
{
|
|
remarkPlugins: ['remark-code-titles'],
|
|
rehypePlugins: [
|
|
['rehype-autolink-headings', { behavior: 'prepend' }],
|
|
['rehype-toc', { headings: ['h2', 'h3'] }],
|
|
['rehype-add-classes', { 'h1,h2,h3': 'title' }],
|
|
'rehype-slug',
|
|
],
|
|
},
|
|
],
|
|
},
|
|
});
|