From 7fac67838cadadacf06f41d7b70d1f5bfa3d9eaa Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Fri, 20 Sep 2024 11:16:37 +0100 Subject: [PATCH 1/2] feat(markdown): document new option --- src/content/docs/en/guides/markdown-content.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/content/docs/en/guides/markdown-content.mdx b/src/content/docs/en/guides/markdown-content.mdx index cc2347e8961ed..ef811fc37a73b 100644 --- a/src/content/docs/en/guides/markdown-content.mdx +++ b/src/content/docs/en/guides/markdown-content.mdx @@ -355,6 +355,12 @@ export default defineConfig({ // Note: Shiki has countless langs built-in, including .astro! // https://shiki.style/languages langs: [], + // Add custom aliases for languages + // The key is the alias you'll use in your markdown files and the value is the language ID used by Shiki + // https://shiki.style/guide/load-lang#custom-language-aliases + langAlias: { + cjs: "javascript" + }, // Enable word wrap to prevent horizontal scrolling wrap: true, // Add custom transformers: https://shiki.style/guide/transformers From f620788bec6eb345bf9a8399c36d4b337f2a634d Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Thu, 3 Oct 2024 12:21:03 +0100 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Sarah Rainsberger --- src/content/docs/en/guides/markdown-content.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/en/guides/markdown-content.mdx b/src/content/docs/en/guides/markdown-content.mdx index ef811fc37a73b..e5ee46a8d405d 100644 --- a/src/content/docs/en/guides/markdown-content.mdx +++ b/src/content/docs/en/guides/markdown-content.mdx @@ -356,7 +356,7 @@ export default defineConfig({ // https://shiki.style/languages langs: [], // Add custom aliases for languages - // The key is the alias you'll use in your markdown files and the value is the language ID used by Shiki + // Map an alias to a Shiki language ID: https://shiki.style/languages#bundled-languages // https://shiki.style/guide/load-lang#custom-language-aliases langAlias: { cjs: "javascript"