Skip to content

A demo on how Shiki's `defaultColor` option can be supported in Astro's `<Code/>` component

Notifications You must be signed in to change notification settings

ARipeAppleByYoursTruly/astro-code-defaultColor-support-demo

Repository files navigation

Astro's <Code/> component defaultColor option support demo

Astro version: 4.11.1

Currently requires changes to files in node_modules to make the demo work. I copied the modified files to node_modules - modified files, use them to overwrite the files after npm install.

Here's the list of node_module files I modified:

  • node_modules/astro/components/Code.astro
  • node_modules/@astrojs/markdown-remark/dist/types.d.ts
  • node_modules/@astrojs/markdown-remark/dist/shiki.d.ts
  • node_modules/@astrojs/markdown-remark/dist/shiki.js

For Code.astro, The error message seems to be a false-positive, because the demo runs fine. Not sure how to make it go away though.

How to view the demo

  1. npm install
  2. Overwrite node_module files with the files in node_module - modified files
  3. npm run dev

References

About

A demo on how Shiki's `defaultColor` option can be supported in Astro's `<Code/>` component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published