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

Replace prism with shiki #253

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Replace prism with shiki #253

wants to merge 1 commit into from

Conversation

msujew
Copy link
Member

@msujew msujew commented Sep 6, 2024

Closes #244

Allows us to more easily highlight our custom code (like the minilogo language and other in our documentation), using textmate instead of prism. Highlighting our custom code can be done in a separate PR, this only highlights the already existing code.

Copy link

github-actions bot commented Sep 6, 2024

PR Preview Action v1.4.6
🚀 Deployed preview to https://eclipse-langium.github.io/langium-previews/pr-previews/pr-253/
on branch previews at 2024-09-06 20:00 UTC


// This isn't a particularly smart query implementation,
// so lets take the simple route and just grab all of the pre tags
const codeBlocks = dom.querySelectorAll("pre")
Copy link
Contributor

Choose a reason for hiding this comment

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

Very pragmatic :D... but what about a more official way? Are there no shiki plugins or addons for Hugo?

I googled it and discovered your source for this code:
https://blog.puzzmo.com/posts/2024/06/23/shiki-hugo/
We should add a link in case of any improvements in their comments (Maybe we have some trouble with this code, then it is good to look up this link first).

WDYT?

@@ -4,12 +4,14 @@
"author": "TypeFox",
"license": "MIT",
"private": true,
"type": "module",
Copy link
Contributor

Choose a reason for hiding this comment

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

This destroys the link checking build step :-/...

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.

Use shiki for prerendered documentation syntax highlighting
2 participants