Shiki once more
Type
- [x] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
Description
Upgrade Shiki, which required upgrading the unified collective, which required switching to contentlayer2.
Related
- Closes #710
@lishaduck is attempting to deploy a commit to the Effect Team on Vercel.
A member of the Team first needs to authorize it.
It still uses the classic renderer, but otherwise it works now.
I'm going to put the rich renderer into a different PR, it'll need some tweaking, and I'd rather have someone more design oriented figure out how they want to render it, as the default css looks pretty bad.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| website | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 12, 2024 2:47am |
@lishaduck - thank you very much for all your work! I'll take a closer look tomorrow. Also cc'ing @gcanti for another set of 👀 validating the Shiki visuals.
@lishaduck - thank you very much for all your work! I'll take a closer look tomorrow.
You're welcome! And honestly, thanks! I'd been wanting to do some more investigation into Shiki, and this was the perfect excuse 🙃
I looked through a bunch of the documentation and from my perspective this PR looks good. I'll wait for @gcanti to have a chance to review though.
Oh yeah, and I didn't see changesets set up. Do I need to do that here?
@lishaduck - no need to create a changeset - we don't version the website in that manner.
Looks like there are a couple of issues:
- the code block metadatas are not respected, for example here https://website-git-fork-lishaduck-shiki-once-more-effect-ts.vercel.app/docs/quickstart the code snippets should have a "Terminal" title (see https://effect.website/docs/quickstart for reference)
Yeah, must've reordered too much.
- the
@includedirective of twoslash is not respected, for example https://website-git-fork-lishaduck-shiki-once-more-effect-ts.vercel.app/docs/guides/error-management/expected-errors#error-tracking
~~I was looking, and it's not a twoslash feature, must've been injected by something else, I guess.~~ It wasn't in the original ts version nor the current Shiki one, but the old v0 Shiki version does. I guess I'll mark this as draft then and file an issue.
EDIT: (Un)blocked on twoslashes/twoslash#47
I haven't forgotten about this, it's is blocked on shikijs/shiki#737 (and possibly shikijs/shiki#746) getting merged. I'll try to finish this 🔜
EDIT: It's been merged, 🥳 EDIT 2: It does require #771 though, so this'll still be a larger endeavour.
Ok, been looking through the docs. Here's a list of issues for my own reference. I think we ran into these: https://rehype-pretty.pages.dev/#meta-strings, I think there's a conflict with https://rehype-pretty.pages.dev/#titles; and possibly https://shiki.style/packages/rehype#line-highlight / https://rehype-pretty.pages.dev/#highlight-lines. I also ran into timlrx/contentlayer2#35.
Also, are we OK moving to contentlayer2 given Reimagining ContentLayer with Effect? Is there a contentlayer3 hanging around somewhere?
Closing as blocked on a separate contentlayer upgrade. The scope got too big, debugging rehype isn't fun.