Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Go package that renders markdown into HTML

C-Hatton/chrisdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage:

// Declare images link
config := Config{
	ImageBaseURL: "https://example.com/images",
}

// Render the markdown
outputContent := chrisdown.RenderMarkdown(string(inputContent), chrisdown.Config(config))

Example Input & Output:

# title

- circle
    - square
        - disc

1. decimal
   1. lower-alpha
      1. decimal

<h1>title</h1>
<ul style="list-style-type: circle">
<li>circle</li>
<ul style="list-style-type: square">
<li>square</li>
<ul style="list-style-type: disc">
<li>disc</li>
</ul>
</ul>
<ol style="list-style-type: decimal">
<li>decimal</li>
<ol style="list-style-type: lower-alpha">
<li>lower-alpha</li>
<ol style="list-style-type: decimal">
<li>decimal</li>
</ol>
</ol>
</ol>
</ul>

You may want to add some CSS to render the HTML nicely.

About

Go package that renders markdown into HTML

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages