Syntax Highlighting in the forum

I often come across code examples in the forum, which are hard to read because of missing syntax highlighting. Fortunately Discourse (our forum software) offers Github style code blocks with syntax highlighting. You can find more about it in the Github docs: https://help.github.com/articles/github-flavored-markdown/#syntax-highlighting

It’s super easy to use and it would be fantastic if you could add it wherever possible.

Cheers, Bastian

4 Likes

I noticed that the highlighting js library doesn’t seem to be able to handle yaml code blocks - so sample code for blueprints always end up mis-highlighted. Is there a ‘safe’ syntax for yaml, or at least a way to turn the syntax highlighting off for our blueprint code?

1 Like

##Hint:

In my blueprint code I use the word ini as the code word after the three tickmarks

A blueprint is technically YAML, so yml will give you really nice results. :wink:

This is what yml looks like:

title: Page
pages: true
files: true
fields:
  title:
    label: Title
    type:  text
  text:
    label: Text
    type:  textarea

This is what ini looks like:

title: Page
pages: true
files: true
fields:
  title:
    label: Title
    type:  text
  text:
    label: Text
    type:  textarea

@luxlogica:
Thank you for your nice confirming the contents of my above post.