-
Notifications
You must be signed in to change notification settings - Fork 10
Custom syntax highlighting & clickable keywords #14
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 & clickable keywords #14
Conversation
The concept is very good. To save effort, maybe you can make the generate script run with npm run dev and build, so it runs those 2 ways (for local dev and also build deployment), this way you can make them build fail if that script errors. |
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR adds custom syntax highlighting for Lua examples on the pages. The highlighting supports client, server, shared functions, and any other code elements. More details: https://discord.com/channels/801330706252038164/1292848627659571273/1375686575127793725
Maybe someone will be willing to polish those styles because I just used the default one from Visual Studio. The light theme definitely needs improvement, but developing it is beyond me. My eyes can’t handle it, and on top of that, for some reason, some colors in the light theme appear darker than the actual hex codes used.
It works simply — after adding a new function or editing its side (client, shared, server), just run this CMD file, and everything will be generated automatically in the right places

This PR also adds the ability to click on function names and special keywords (e.g., string, float, player, vehicle, element) just like on the old wiki.