Syntax extracts code fragments in Orchard when setting to use markdowns

I installed Orchard 1.7.0, turned on the blog post mark (approximately as detailed here ), but I cannot figure out how to add syntax highlighting for C # (or any language) for my posts.

  • Does Orchard have the ability to add syntax highlighting for markdowns? or
  • How does stackoverflow add syntax highlighting?
  • Will the syntax shortcut for the garden get the desired effect?
+6
source share
1 answer

StackExchange uses Google Code Prettify (see here ), and there is the Orchard module TheMonarch.SyntaxHighlighter that installs this.

This module uses Google prettify code to add syntax highlighting to Orchard Blog posts. Select one of several topics in the admin interface. The Google prettify code automatically detects most languages.

+5
source

Source: https://habr.com/ru/post/954953/


All Articles