https://github.com/josefpihrt/dotmarkdown
DotMarkdown is Markdown framework for .NET
https://github.com/josefpihrt/dotmarkdown
Last synced: 4 days ago
JSON representation
DotMarkdown is Markdown framework for .NET
- Host: GitHub
- URL: https://github.com/josefpihrt/dotmarkdown
- Owner: josefpihrt
- License: apache-2.0
- Created: 2018-01-30T01:31:47.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2024-11-29T05:21:22.000Z (5 months ago)
- Last Synced: 2025-04-12T04:52:04.916Z (4 days ago)
- Language: C#
- Homepage: https://josefpihrt.github.io/docs/dotmarkdown
- Size: 1.22 MB
- Stars: 123
- Watchers: 4
- Forks: 9
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
- Codeowners: CODEOWNERS
Awesome Lists containing this project
- jimsghstars - josefpihrt/dotmarkdown - DotMarkdown is Markdown framework for .NET (C# #)
README
# DotMarkdown
## Introduction
* DotMarkdown is a framework for creating markdown content
* The library is distributed as [](https://nuget.org/packages/DotMarkdown).## Supported Frameworks
* .NET Standard 1.3
* .NET Framework 4.6## Documentation
* [Reference documentation](https://josefpihrt.github.io/docs/dotmarkdown/ref)
## Usage
### Commonly Used Types
* `DotMarkdown.MarkdownWriter`
* `DotMarkdown.MarkdownWriterSettings`
* `DotMarkdown.MarkdownFormat`
* `DotMarkdown.Linq.MFactory`### How to Use MarkdownWriter
```csharp
using System.Text;
using DotMarkdown;var sb = new StringBuilder();
using (MarkdownWriter writer = MarkdownWriter.Create(sb))
{
writer.WriteHeading1("Markdown Sample");
writer.WriteHeading2("Bullet List");
writer.WriteBulletItem("text");
writer.WriteStartBulletItem();
writer.WriteBold("bold text");
writer.WriteEndBulletItem();writer.WriteHorizontalRule();
writer.WriteHeading2("Indented Code Block");
writer.WriteIndentedCodeBlock("string s = null;");
}Console.WriteLine(sb.ToString());
```#### Output
```
# Markdown Sample## Bullet List
* text
* **bold text**
- - -## Indented Code Block
string s = null;
```- - -
### How to Use LINQ to Markdown
```csharp
using DotMarkdown.Linq;
using static DotMarkdown.Linq.MFactory;MDocument document = Document(
Heading1("Markdown Sample"),
Heading2("Bullet List"),
BulletList(
"text",
Bold("bold text")),
HorizontalRule(),
Heading2("IndentedCodeBlock"),
IndentedCodeBlock("string s = null;"));Console.WriteLine(document.ToString());
```#### Output
```
# Markdown Sample## Bullet List
* text
* **bold text**- - -
## IndentedCodeBlock
string s = null;
```## Links
* [Mastering Markdown](http://guides.github.com/features/mastering-markdown/)
* [Markdown Cheatsheet](http://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)
* [Markdown Guide](https://www.markdownguide.org)
* [Daring Fireball: Markdown Syntax Documentation](http://daringfireball.net/projects/markdown/syntax)
* [CommonMark Spec](http://spec.commonmark.org)