nitinthewiz / ghost-phantom

Phantom theme for Ghost
MIT License
434 stars 121 forks source link

Syntax Highlighting #12

Closed CMCDragonkai closed 9 years ago

CMCDragonkai commented 9 years ago

Will you be supporting syntax highlighting eventually?

haydenbleasel commented 9 years ago

That's probably a good idea, what library would you recommend?

CMCDragonkai commented 9 years ago

These guys are the best! https://highlightjs.org/ I've used it before.

BTW I'm happily using your theme on my startup http://matrix.ai

haydenbleasel commented 9 years ago

Awesome site - the concept of a cloud OS looks super interesting! Reminds me of a Node.js operating system I saw a while back.

I'll look around at the different syntax highlighters (performance, support, etc.) but i'll keep HighlightJS in mind.

haydenbleasel commented 9 years ago

@CMCDragonkai Almost finished implementing this but I've run into this stupid indentation issue because Markdown creates a <code> within a <pre>. Any ideas on how to solve this one?

screenshot 2014-10-30 20 57 52

richard-mckenna commented 9 years ago

@ErisDS was helping me with this issue on the Ghost forums yesterday https://ghost.org/forum/using-ghost/16929-indentations-syntax-highlightling/ and has made and issue here https://github.com/haydenbleasel/ghost-themes/issues/14

Basically handlebars.js has changed the way it indents partials. Removing the indentation from the {{>content}} partial will fix this.

haydenbleasel commented 9 years ago

@spill50 Okay cool, thanks mate. I've finished this issue so we'll move over to #14 now.

CMCDragonkai commented 9 years ago

Awesome, so can I assume the instructions are basically write the 3 ```

Then just write the code annotation on the right hand side, like javascript or something else.

And it automatically detects the language, and highlights it?

haydenbleasel commented 9 years ago

I don't think you even need to write the language on the side, just use indent-based or ``` code blocks and it should auto-detect the language.

CMCDragonkai commented 9 years ago

That's smart.