Quantcast
Channel: Add syntax highlighting to gh-pages - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Answer by Brent for Add syntax highlighting to gh-pages

$
0
0

Found this thread as the first hit while trying to figure out syntax highlighting, and I found an even easier way to do it that I thought I'd share. Just put the name of the language you want highlighted after the fenced code blocks (reference). No need to generate any css or use yaml.

This is regular text```ruby# This is highlighted codedef foo  puts 'foo'end``````python# Here is some in pythondef foo():  print 'foo'```

Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>