unjs / undocs

Minimal Documentation theme and CLI for shared usage across UnJS projects.
https://undocs.pages.dev/
MIT License
143 stars 12 forks source link

feat/highlight code #90

Closed pi0 closed 4 months ago

pi0 commented 4 months ago

[wip]

cloudflare-pages[bot] commented 4 months ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3a5fe7c
Status: ✅  Deploy successful!
Preview URL: https://53591d29.undocs.pages.dev
Branch Preview URL: https://feat-highlight-code.undocs.pages.dev

View logs

cpreston321 commented 4 months ago

@pi0 this would work if the Shiki just return the generate code with pre tag vs with div or span. That is what the ProseCode expects.

If you see it adds an extra div.

CleanShot 2024-03-04 at 13 00 17@2x

pi0 commented 4 months ago

Yes just talking with @benjamincanac and he mentioned it is hard to support without unwrap.

I guess will endup with a dirty transform in nuxt-shiki to unwrap…

pi0 commented 4 months ago

Okay we supprot unwrap and have a working poc but just noticed the blocks are single colored 😆 (sometimes I feel trapped with over engineering)

image