Open berkus opened 6 years ago
Closing in favor of https://github.com/cobalt-org/cobalt.rs/issues/301
please open an issue about user-provided syntax highlight themes and syntaxes
Ah, I misunderstood the request. Not sure this is something cobalt can/should do? We have hljs
and it's pretty decent as far as markdown code blocks are tagged with the language, which cobalt does.
Oh, this is syntax highlighting themes! I thought you meant the cobalt themes.
We should keep in mind how #301 might impact this. For example, a cobalt theme might want to set a syntax theme that matches.
In hugo, this was confusing, as the themes have defined themselves how they do syntax highlighting, if at all.
so there was a top-level config theme =
which selected which theme and in hyde-x there was params.theme =
which selected the theme's color theme (from a list of presets) and then a params.highlight =
which selected hljs theme to use.
This is an epic, I will try to update it with more RFC-worthy data when I have time.
Basically, we need to add support for user-definable themes, and then for a way to override/customize these themes if users wish to do so.
One of the good references is hugo - it has a flexible themeing support with local overriding (not for everything though, and configuration file can get at times rather ugly - we need to improve on this).
Prior Art
Gutenberg
Syntaxes and themes are added via pull requests to the main project
See https://www.getgutenberg.io/documentation/content/syntax-highlighting/