Skip to content

Commit

Permalink
🔧 re-enable expressive-code (thank you @hippotastic)
Browse files Browse the repository at this point in the history
  • Loading branch information
loucyx committed May 5, 2024
1 parent f87a166 commit cd8d38d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions docs/astro.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import starlight from "@astrojs/starlight";
import tailwind from "@astrojs/tailwind";
import { pluginLineNumbers } from "@expressive-code/plugin-line-numbers";
import { defineConfig } from "astro/config";
import { rehypeAccessibleEmojis } from "rehype-accessible-emojis";
import rehypeExternalLinks from "rehype-external-links";
Expand All @@ -10,17 +11,15 @@ export default defineConfig({
integrations: [
starlight({
customCss: ["./src/tailwind.css"],
expressiveCode: false,
// TODO: Re-enable once expressive-code can render emoji again in Astro
/* {
expressiveCode: {
defaultProps: { wrap: false },
plugins: [pluginLineNumbers()],
styleOverrides: {
codeFontFamily: "MonaspaceArgon, monospace",
uiFontFamily: "MonaspaceArgon, monospace",
},
tabWidth: 0,
} */
},
head: [
{
attrs: { content: "same-origin" },
Expand Down Expand Up @@ -57,7 +56,12 @@ export default defineConfig({
],
markdown: {
rehypePlugins: [
rehypeAccessibleEmojis,
[
rehypeAccessibleEmojis,
{
ignore: ["code", "math", "script", "style", "svg", "title"],
},
],
[
rehypeExternalLinks,
{ rel: "nofollow noopener noreferrer", target: "_blank" },
Expand Down

0 comments on commit cd8d38d

Please sign in to comment.