Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shiki once more #770

Closed
wants to merge 2 commits into from
Closed

Conversation

lishaduck
Copy link

Type

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Upgrade Shiki, which required upgrading the unified collective, which required switching to contentlayer2.

Related

Copy link

vercel bot commented Jul 11, 2024

@lishaduck is attempting to deploy a commit to the Effect Team on Vercel.

A member of the Team first needs to authorize it.

@lishaduck
Copy link
Author

It still uses the classic renderer, but otherwise it works now.

@lishaduck
Copy link
Author

lishaduck commented Jul 11, 2024

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.

This was referenced Jul 11, 2024
Copy link

vercel bot commented Jul 12, 2024

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

@IMax153
Copy link
Member

IMax153 commented Jul 12, 2024

@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
Copy link
Author

@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 🙃

@IMax153 IMax153 requested review from gcanti and IMax153 July 12, 2024 17:37
@IMax153
Copy link
Member

IMax153 commented Jul 12, 2024

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.

@lishaduck
Copy link
Author

Oh yeah, and I didn't see changesets set up. Do I need to do that here?

@IMax153
Copy link
Member

IMax153 commented Jul 12, 2024

@lishaduck - no need to create a changeset - we don't version the website in that manner.

Copy link
Contributor

@gcanti gcanti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there are a couple of issues:

@lishaduck
Copy link
Author

lishaduck commented Jul 13, 2024

Looks like there are a couple of issues:

Yeah, must've reordered too much.

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

@lishaduck lishaduck marked this pull request as draft July 16, 2024 14:54
@lishaduck
Copy link
Author

lishaduck commented Aug 11, 2024

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.

@lishaduck
Copy link
Author

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?

@lishaduck
Copy link
Author

Closing as blocked on a separate contentlayer upgrade.
The scope got too big, debugging rehype isn't fun.

@lishaduck lishaduck closed this Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Shiki
3 participants