summaryrefslogtreecommitdiff
path: root/packages/markdown/remark/CHANGELOG.md
diff options
context:
space:
mode:
authorGravatar Houston (Bot) <108291165+astrobot-houston@users.noreply.github.com> 2024-10-10 04:21:19 -0700
committerGravatar GitHub <noreply@github.com> 2024-10-10 12:21:19 +0100
commit582f12e1f6f99b54865a0b24d804ee0924f4ef55 (patch)
tree436a14894bd0254acfb1dcf84c00ffbfd556f687 /packages/markdown/remark/CHANGELOG.md
parentb9e8e96354019c21c8b73585bea74b84b9b092ee (diff)
downloadastro-@astrojs/markdoc@0.11.5.tar.gz
astro-@astrojs/markdoc@0.11.5.tar.zst
astro-@astrojs/markdoc@0.11.5.zip
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'packages/markdown/remark/CHANGELOG.md')
-rw-r--r--packages/markdown/remark/CHANGELOG.md34
1 files changed, 34 insertions, 0 deletions
diff --git a/packages/markdown/remark/CHANGELOG.md b/packages/markdown/remark/CHANGELOG.md
index 73bab0b25..1563450b4 100644
--- a/packages/markdown/remark/CHANGELOG.md
+++ b/packages/markdown/remark/CHANGELOG.md
@@ -1,5 +1,39 @@
# @astrojs/markdown-remark
+## 5.3.0
+
+### Minor Changes
+
+- [#12039](https://github.com/withastro/astro/pull/12039) [`710a1a1`](https://github.com/withastro/astro/commit/710a1a11f488ff6ed3da6d3e0723b2322ccfe27b) Thanks [@ematipico](https://github.com/ematipico)! - Adds a `markdown.shikiConfig.langAlias` option that allows [aliasing a non-supported code language to a known language](https://shiki.style/guide/load-lang#custom-language-aliases). This is useful when the language of your code samples is not [a built-in Shiki language](https://shiki.style/languages), but you want your Markdown source to contain an accurate language while also displaying syntax highlighting.
+
+ The following example configures Shiki to highlight `cjs` code blocks using the `javascript` syntax highlighter:
+
+ ```js
+ import { defineConfig } from 'astro/config';
+
+ export default defineConfig({
+ markdown: {
+ shikiConfig: {
+ langAlias: {
+ cjs: 'javascript',
+ },
+ },
+ },
+ });
+ ```
+
+ Then in your Markdown, you can use the alias as the language for a code block for syntax highlighting:
+
+ ````md
+ ```cjs
+ 'use strict';
+
+ function commonJs() {
+ return 'I am a commonjs file';
+ }
+ ```
+ ````
+
## 5.2.0
### Minor Changes