How can I keep some raw block when ToHtml #586

Closed
opened 2026-01-29 14:40:25 +00:00 by claunia · 1 comment
Owner

Originally created by @newbe36524 on GitHub (Jan 25, 2023).

Question

When I do something below:

        var builder = new MarkdownPipelineBuilder()
            .UseYamlFrontMatter();
        var pipeline = builder.Build();

I want to keep all markdown text output to html as raw markdown string but still removing YamlFrontMatter.

E.g.

from

---
title: This is title
---

something here

## This is title

To

something here

## This is title

Heading is out as markdown format.

Background

I am working for a platform to parse markdown into multiple blog platforms.
One of the platforms can parse markdown as source content to create a post. So I want to keep all markdown strings but still to remove YamlFrontMatter and do something shared among other platforms.

Originally created by @newbe36524 on GitHub (Jan 25, 2023). ## Question When I do something below: ```cs var builder = new MarkdownPipelineBuilder() .UseYamlFrontMatter(); var pipeline = builder.Build(); ``` I want to keep all markdown text output to html as raw markdown string but still removing YamlFrontMatter. E.g. from ```md --- title: This is title --- something here ## This is title ``` To ```md something here ## This is title ``` Heading is out as markdown format. ## Background I am working for a platform to parse markdown into multiple blog platforms. One of the platforms can parse markdown as source content to create a post. So I want to keep all markdown strings but still to remove YamlFrontMatter and do something shared among other platforms.
Author
Owner

@newbe36524 commented on GitHub (Feb 7, 2023):

In the end I decided it was a straightforward process using string operations.
So I decided to close this issue.

@newbe36524 commented on GitHub (Feb 7, 2023): In the end I decided it was a straightforward process using string operations. So I decided to close this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#586