abcoathup
(Andrew B Coathup)
2019 年5 月 15 日 07:00
1
I am using a hosted Discourse service and wanted to know how to get Solidity syntax highlighting working.
Solidity isn’t a language in https://github.com/highlightjs/highlight.js but there is a repo for the Solidity language https://github.com/highlightjs/highlightjs-solidity .
sam
(Sam Saffron)
2019 年5 月 15 日 07:03
2
Best approach is to submit a PR to highlightjs to add it, that way we will get it next time we upgrade highlightjs
3 个赞
abcoathup
(Andrew B Coathup)
2019 年5 月 15 日 07:56
3
What is the frequency of that?
sam
(Sam Saffron)
2019 年5 月 15 日 07:57
4
We pretty much update every release, if you get it into highlight we will update.
3 个赞
abcoathup
(Andrew B Coathup)
2019 年6 月 11 日 06:12
5
Hi @sam
I have been advised that Solidity should stay in it’s own repo (https://github.com/highlightjs/highlightjs-solidity/ ) rather than be added to the highlight.js repo.
https://github.com/highlightjs/highlight.js/pull/2051#issuecomment-499711780
How do I configure a hosted discourse forum to use this repo?
sam
(Sam Saffron)
2019 年6 月 11 日 07:08
6
I added a comment there, will follow up next week here depending on the response we get.
Perhaps create your own repo with the language, to start? We can then add it to the list of highlight languages we pull?
2 个赞
abcoathup
(Andrew B Coathup)
2019 年6 月 11 日 08:57
7
Hi @sam
A repo with the Solidity language is in the highlightjs organisation already:
https://github.com/highlightjs/highlightjs-solidity/
2 个赞
abcoathup
(Andrew B Coathup)
2019 年6 月 25 日 01:11
9
Hi @sam did you get any response?
sam
(Sam Saffron)
2019 年6 月 25 日 01:15
10
Nothing from GitHub… not sure what we are meant to do here.
2 个赞
abcoathup
(Andrew B Coathup)
2019 年6 月 25 日 01:17
11
My goal is syntax highlighting of the Solidity language in a hosted Discourse forum.
Just trying to work out how to get there
1 个赞
sam
(Sam Saffron)
2019 年6 月 25 日 01:21
12
I am assigning this out, we will figure something out, give us a couple of weeks.
2 个赞
pmusaraj
(Penar Musaraj)
2019 年6 月 26 日 02:54
15
Hi @abcoathup ,
Please try this theme component: https://github.com/pmusaraj/discourse-highlight.js-solidity
I had to build Highlight.JS with the solidity language and then use the generated minimized language in Discourse. Step-by-step details in the component’s readme.
8 个赞
abcoathup
(Andrew B Coathup)
2019 年6 月 27 日 06:02
16
Hi @pmusaraj and @sam
We are on a hosted Business plan, so assume that I can’t add this plugin.
What other options do we have to get Solidity syntax highlighting?
This isn’t a plugin, it’s a theme component that you can add to an existing theme. You are free to install themes and theme-components by yourself using these instructions: Install a theme or theme component
6 个赞
abcoathup
(Andrew B Coathup)
2019 年6 月 27 日 07:16
18
Awesome, we now have Solidity syntax highlighting in Discourse.
6 个赞
system
(system)
关闭
2019 年7 月 27 日 07:16
19
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.