From d7693a0dfccf88ff3a54cca39ec39837a441ee22 Mon Sep 17 00:00:00 2001 From: ache Date: Tue, 20 Jun 2023 18:35:49 +0200 Subject: Fix table of contents --- src/build/to-html.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/build/to-html.mjs') diff --git a/src/build/to-html.mjs b/src/build/to-html.mjs index adfcd7a..786f91d 100644 --- a/src/build/to-html.mjs +++ b/src/build/to-html.mjs @@ -15,6 +15,7 @@ import rehypeStringify from 'rehype-stringify'; import rehypeHighlight from 'rehype-highlight'; import remarkSpecialBox from './special_box.mjs'; import remarkRemoveFootnoteHeader from './remove-footnote-header.mjs'; +import {getTocHeading} from './i18n.mjs'; const autoLinkOption = { behavior: 'wrap', @@ -31,7 +32,7 @@ const pictureOptions = { const generator = unified() .use(remarkParse) .use(remarkGfm) - .use(remarkToc, {heading: 'Sommaire', tight: true, ordered: true}) + .use(remarkToc, {heading: getTocHeading(), tight: true, ordered: true}) .use(remarkMath) .use(remarkDirective) .use(remarkSpecialBox) @@ -49,7 +50,7 @@ const generator = unified() const generatorMd = unified() .use(remarkParse) .use(remarkGfm) - .use(remarkToc, {heading: 'Sommaire', tight: true, ordered: true}) + .use(remarkToc, {heading: getTocHeading(), tight: true, ordered: true}) .use(remarkMath) .use(remarkDirective) .use(remarkSpecialBox) -- cgit v1.2.3-70-g09d2