diff --git a/eleventy.config.md.js b/eleventy.config.md.js index cdf9d80f..73a1a935 100644 --- a/eleventy.config.md.js +++ b/eleventy.config.md.js @@ -81,13 +81,22 @@ module.exports = function (eleventyConfig) { // Paired shorcode: Spoiler accordion eleventyConfig.addPairedShortcode('spoiler', (content, hint) => { - content = content.trim(); - const hintMarkUp = markdownLibrary.renderInline(hint); + const hintMarkup = markdownLibrary.renderInline(hint); const contentMarkup = markdownLibrary.render(content); return `
- ${hintMarkUp} -
${contentMarkup}
-
`; + ${hintMarkup} +
${contentMarkup}
+ `; + }); + + // Paired shorcode: Q&A accordion + eleventyConfig.addPairedShortcode('qna', (answer, question) => { + const questionMarkup = markdownLibrary.renderInline(question); + const answerMarkup = markdownLibrary.render(answer); + return `
+ ${questionMarkup} +
${answerMarkup}
+
`; }); /* This is the part that tells 11ty to swap to our custom config */