Caddy Syntax Discourse Integration

I’m fairly sure that Discourse has a syntax highlighter. Now I’ve been thinking for the short time this forum has been up, someone should totally make a syntax definition for Caddy, for Discourse!
I think this would definitely help out on being able to read a Caddyfile.

What do you guys think ?

Yes, I think that’d be great. Someone should do it…

If someone can point me towards the docs for whatever Discourse’s syntax highlighter is, I’ll throw something together after dinner.

I couldn’t find any documentation or forum posts on the Meta forum about syntax highlighting plugins. You would have to go here: https://github.com/discourse/discourse/tree/master/lib/highlight_js/assets/lang

That’s the folder with all the languages it accepts via HighlightJS.

If someone implemented Caddyfile syntax for highlight.js, then I’d also be able to use it on the Caddy website (which uses highlight.js). :+1:

@matt Got a beer, got the highlight.js and Caddyfile docs, let’s see what I can hack together.

Awesome! That would be wicked.

Is there somewhere a grammar available for Caddy?
Because what’s a DSL without a grammar? :stuck_out_tongue:

Not sure. I guess you could take a look at the Caddy documentation and whip up a diagram.

Eventually. One thing at a time… :smile:

Maybe I can work a bit on it, that way people writing new middlewares or making configurations can follow the grammar?

Any luck yet ?

Haha, haven’t done a thing yet… Very busy here right now.

Oh alright, sorry!

Eeh, bits and bobs. Highlight.js docs aren’t what I’d like them to be, and yesterday I was tearing up carpet all day!