-
Notifications
You must be signed in to change notification settings - Fork 20
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
Migrate Website to Docusaurus 2 Alpha #25
Comments
FYI we’re also considering rewriting this site in Hack, reusing the existing docs.hhvm.com code. If we did use docusaurus 2, the syntax highlighting would need to support Hack - and the PHP highlighter is no longer usable. If you’re using the same library as GitHub itself, that works, or if you can import vscode syntax highlighting definitions. We don’t want to maintain another syntax highlighting definition. |
Looks like Docusaurus v2 uses https://prismjs.com/ for highlighting (instead of highlight.js in v1). PrismJS doesn't claim support for Hacklang (https://prismjs.com/#supported-languages) and it has its own language definition DSL (https://prismjs.com/extending.html#language-definitions). I don't know the work to convert https://github.com/github/linguist or VS Code definitions to PrismJS's. |
It would need to be fully automated; the ideal path forward would be if Docusaurus added support for a library that supports textmate grammars. @bolinfest had a demo of Monaco Editor with TextMate support, but I don't know the current state, or what would be involved in docusaurus support. |
This repo is just the front page at https://hacklang.org/, isn't it? (every link there goes to docs.hhvm.com or elsewhere) It has 3 hardcoded examples that basically never changed so setting up a full syntax highlighting library for that might be overkill, or at least doesn't need to be a hard blocker. I should probably migrate the deployment of this repo to use GitHub Actions (or whatever GitHub Pages normally uses) because CircleCI is failing -- might be a good opportunity to migrate to the new Docusaurus version at the same time. |
@jjergus yep. Two questions make this more complicated than just porting what we have:
|
"No" is fine for both of those, just should decide that first :) |
FYI, https://github.com/bolinfest/monaco-tm is an up-to-date example of using TextMate grammars with Monaco, though you don't actually need to use Monaco to produce syntax highlighted code samples. Perhaps I should try to create a small npm package that provides a React component to display code snippets. |
Hi there! The Docusaurus team is currently developing Docusaurus 2 and are almost done with an MVP that doesn't include translations and versioning features, which means there's feature parity with your website's current usage of Docusaurus.
Docusaurus 2 brings about many improvements:
I will be helping you migrate and be the POC throughout the migration process. Let me know what you think!
cc @yangshun @wgao19
The text was updated successfully, but these errors were encountered: