Add tech blog theme

- Add code colorizer Markdig plugin
This commit is contained in:
2022-05-05 02:15:36 -04:00
parent 22ed55c820
commit f106f2b10e
12 changed files with 582 additions and 4 deletions

View File

@@ -14,6 +14,7 @@
<ItemGroup>
<PackageReference Include="Markdig" Version="0.30.2" />
<PackageReference Update="FSharp.Core" Version="6.0.3" />
<PackageReference Include="Markdown.ColorCode" Version="1.0.1" />
</ItemGroup>
</Project>

View File

@@ -1,7 +1,6 @@
namespace MyWebLog
open System
open Markdig
/// Support functions for domain definition
[<AutoOpen>]
@@ -55,6 +54,9 @@ type CommentStatus =
| Spam
open Markdig
open Markdown.ColorCode
/// Types of markup text
type MarkupText =
/// Markdown text
@@ -66,7 +68,7 @@ type MarkupText =
module MarkupText =
/// Pipeline with most extensions enabled
let private _pipeline = MarkdownPipelineBuilder().UseSmartyPants().UseAdvancedExtensions().Build ()
let private _pipeline = MarkdownPipelineBuilder().UseSmartyPants().UseAdvancedExtensions().UseColorCode().Build ()
/// Get the source type for the markup text
let sourceType = function Markdown _ -> "Markdown" | Html _ -> "HTML"