-
Notifications
You must be signed in to change notification settings - Fork 2
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
custom syntax highlighting of gaml code in github markdown #49
Comments
For the Github Wiki I'm afraid that it's impossible (mainly because we can't do any design more than the MarkDown Structure of the file). |
Since we moved to Docusaurus V2, CodeBlocks are rendered using the Prism engine (source). It's not easier to implement, but it's a famous tool in JS world and used by Ghost, MDN, etc; so it may be easy to extend it to other usages (like, maybe, a plugin for GitHub Highlight library 😄 ). I won't work on it any time soon, but if anyone wants to do it, feel free to help 😉 It can either be a PR on the main project, or just a language extension added only on the website |
Hi @RoiArthurB , Please find below a very small js tentative for GAML (rename it as .js). If GAMA produces such a file you can use it on the website? |
Source syntax from @benoitgaudou in issue #49
Hi @benoitgaudou , You're quick implementation does work good, see below :
So if you can generate this file from GAMA, I'll be easily able to integrate it during the website compilation 👌 I also made the branch syntax-gaml to work on it :) |
Thanks! |
Yes, we probably can also tweak the color theme or badly used the syntax to just have appropriate colors on the wiki 🤷 But it's minor tweaking in my point of view :)
Yes you can, it's a little tricky so either we can do it together, otherwise it's mostly following step-by-step the github action here : https://github.com/gama-platform/gama-platform.github.io/blob/sources/.github/workflows/github-travis.yml You'll need to have Python3, pip (package manager for Python), NodeJS, yarn (or npm; both package managers for NodeJS) and bash - I know it's a bit heavy and complex 😅😅 |
Re-opening to work on full Github's syntax support color (forgot that initial issue request 🙈) |
Hi,
I have been wondering if it is possible to have some custom gaml highlighting for code blocks in github markdown. For example, if you use a code block
code block
with a language preference for r , it highlights r keywords as belowor for python as below:
or java as below:
Is it possible to create a custom syntax highlight for gaml language on github markdown? I do not know how easy or difficult it is, but could be nice in sharing or exhibiting code on github tutorials.
The text was updated successfully, but these errors were encountered: