Skip to content
Discussion options

You must be logged in to vote
  1. How to convert a Svelte component into a string.

You can import component as asset with ?raw suffix.
This way has some limitations.

  1. Use Vite.js (including SvelteKit)
  2. Component must not include <script> and <style> tags.
  1. How to highlight code blocks using Shikiji and/or its rehype plugin

rehype-shikiji are not supported.
Because the plugin has an asynchronous transformer.
If you want to highlight code, I recommend using rehype-hightlight.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ssssota
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants