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

docs: Add devicetree and kconfig syntax highlighting #1958

Merged
merged 2 commits into from
Oct 9, 2023

Conversation

joelspadin
Copy link
Collaborator

Added syntax highlighting for devicetree and kconfig files.

The PrismJS project is not accepting contributions right now as they work on a version 2 of the library, so the new language files are added directly here.

Also enabled syntax highlighting for various languages that are used in the docs but aren't enabled in Docusaurus by default.

@joelspadin joelspadin force-pushed the syntax-highlighter branch 2 times, most recently from 7d80da3 to d188958 Compare October 7, 2023 03:22
@petejohanson petejohanson added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 7, 2023
Added syntax highlighting for devicetree and kconfig files.

The PrismJS project is not accepting contributions right now as they
work on a version 2 of the library, so the new language files are added
directly here.

Also enabled syntax highlighting for various languages that are used in
the docs but aren't enabled in Docusaurus by default.
Added language tags to more code blocks in the documentation to enable
syntax highlighting.
@joelspadin
Copy link
Collaborator Author

Tweaked the syntax highlighting to more closely match the scopes used by highlight.js, and ported the github (with adjusted background color) and github-dark-dimmed themes from highlight.js. Note that the sources for these themes are under the BSD license.

Copy link
Contributor

@caksoylar caksoylar left a comment

Choose a reason for hiding this comment

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

LGTM! Unless anyone has concerns on the technical side re: adding our own syntax highlighters and colorschemes, I am down to merge.

@caksoylar caksoylar merged commit 65667b8 into zmkfirmware:main Oct 9, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants