質問

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