Closed Zeneex closed 3 years ago
The browser extension only include a single theme for Highlight.js, see: https://github.com/asciidoctor/asciidoctor-browser-extension/tree/main/app/css/highlight
And the relevant code that adds the Higlight.js theme:
In the future, please use the issue title to state the behavior you want rather than commentary about how you feel about the current behavior. That makes the issue actionable.
This issue is actually a duplicate https://github.com/asciidoctor/asciidoctor-browser-extension/issues/63
Thanks, Guillaume.
I don't use git usually so I'm not familiar at all with titling and everything... Thank you for retitling the issue and everything...
So does this mean we can expect :highlightjs-theme:
attribute support user-defined theme in the near future or is this functionality in question? (I've read all the #63 issue but I'm still unsure)
Or can I add some (dirty) js code to my distro of the extension to make it work (at least for now) on my machine only? I'm not a developer or coder or anything... just a simple user - anything more than a .js file seems alot of code to me and the extension has more than 1 file :), so any help in that direction would be appreciated.
Do the
highlightjs-theme
option value ofgithub
is ACTUALLY hardcoded (can not be changed)? :return "" + "<link rel=\"stylesheet\" href=\"" + (base_url) + "/styles/" + (doc.$attr("highlightjs-theme", "github")) + ".min.css\"" + (opts['$[]']("self_closing_tag_slash")) + ">"
I just found the abovementioned code in asciidoctor.js in the browser extension folder on my system. I've tried and tried and tried to somehow modify the style/theme the highlighter use for some code snippet of mine... I've read on Internet, used
:highlightjs-theme: arta
in the asciidoc document head - does nothing. Used the option in the extension settings' options dialog ashighlightjs-theme=arta
- does nothing. Triedhighlightjs-theme=Arta
; tried:highlightjs-theme: Arta
in head; tried:highlightjs-theme: style/arta
in head; tried:highlightjs-theme: styles/arta.css
in head; download all the styles locally from the GitHub repo, put them in styles folder of the extension -css/highlight/...
, wheregithub.css
file resides; tried whatever combination of paths/names/extensions you can think of - does nothing.Highlighter works, but it always applies the "default" style
github
.Is it what I think it is or am I doing something wrong?