문제

I've installed Orchard 1.7.0, enabled markdown for blog posts (roughly as detailed here) but I'm unable to figure out how to add syntax highlighting for C# (or any language) to my posts.

  • Does Orchard have the facility to add syntax highlighting for markdown? or
  • How does stackoverflow add syntax highlighting?
  • Will Syntax Highlighter for Orchard produce the desired effect?
도움이 되었습니까?

해결책

StackExchange uses Google Code Prettify (see here) and there is an Orchard module TheMonarch.SyntaxHighlighter that sets this up.

This module uses Google code prettify to add syntax highlighting to Orchard Blog posts. Choose from several themes bundled from the Admin UI. Google code prettify automatically detects most languages.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top