You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One way to go about (1) is to allow users to bring their own highlight.pack.js. Maybe it is possible now? I couldn't find any documentation on this. Another way about it is to create a setting that would <script src> additional languages from https://cdnjs.com/libraries/highlight.js/ . This can not be accomplished today with CdnDirectives(jsList=...) since those scripts are sourced after hljs.configure()` gets called.
For (2), we can add an SBT key for micrositeHighlighterLanguages that defaults to Seq("scala", "java", "bash") for backwards compatibility. The same key should probably control the additional languages to download from the CDN.
Thoughts? Happy to send over a PR.
The text was updated successfully, but these errors were encountered:
Thanks @thesamet , both options look good. Perhaps option 2 is more SBT/Scala friendly, in my opinion... And yes! any contribution is totally welcome :)
thesamet
added a commit
to thesamet/sbt-microsites
that referenced
this issue
Aug 18, 2018
I'm trying to add an additional language (
protobuf
) to the syntax highlighter.Currently, microsites supports only
scala
,java
andbash
. This is hard-coded in two places:highlight.pack.js
is pre-built with support only for these languages.One way to go about (1) is to allow users to bring their own
highlight.pack.js
. Maybe it is possible now? I couldn't find any documentation on this. Another way about it is to create a setting that would<script src>
additional languages from https://cdnjs.com/libraries/highlight.js/ . This can not be accomplished today withCdnDirectives(jsList=...) since those scripts are sourced after
hljs.configure()` gets called.For (2), we can add an SBT key for
micrositeHighlighterLanguages
that defaults toSeq("scala", "java", "bash")
for backwards compatibility. The same key should probably control the additional languages to download from the CDN.Thoughts? Happy to send over a PR.
The text was updated successfully, but these errors were encountered: