Skip to content
/ docs Public
forked from withastro/docs

Commit

Permalink
i18n(fr): Add guides/markdown-content.mdx from withastro#8728
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Bonnet <thomasbnt@protonmail.com>
  • Loading branch information
thomasbnt committed Jul 4, 2024
1 parent c64eb1c commit 1430714
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/content/docs/fr/guides/markdown-content.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -411,14 +411,12 @@ import { rehypeAccessibleEmojis } from 'rehype-accessible-emojis';
export default defineConfig({
markdown: {
// Appliqué aux fichiers .md et .mdx
remarkPlugins: [remarkToc],
remarkPlugins: [remarkToc, { heading: 'toc', maxDepth: 3 }],
rehypePlugins: [rehypeAccessibleEmojis],
},
});
```

Notez que par défaut, `remarkToc` nécessite un [titre](https://github.com/remarkjs/remark-toc#optionsheading) "ToC" ou "Table des matières" (insensible à la casse) sur la page pour afficher la table des matières.

#### ID de titres et plugins

Astro injecte un attribut `id` dans tous les éléments titre (`<h1>` à `<h6>`) dans les fichiers Markdown et MDX et fournit un utilitaire `getHeadings()` pour récupérer ces identifiants dans les [propriétés Markdown exportées](#propriétés-exportées).
Expand Down

0 comments on commit 1430714

Please sign in to comment.