Skip to content

About

markdown to html (go, exported for c library)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Rendering HTML

From Markdown to HTML

With syntax highlighting 🎨

func h(w http.ResponseWriter, r *http.Request) {
  title := "It works! 👷"
  md := []byte("# It works!\n```go\nvar k = 4\nprintln(k)\n```\n")
  err := renderinghtml.Markdown2HTMLPage(w, md, title)
  if err != nil {
    slog.Error("render", "err", err)
    w.WriteHeader(http.StatusInternalServerError)
    return
  }
}

If you are seeing this in your web browser, try visiting the test page.


Screenshot

screenshot-1

Features

  • Markdown Rendering
  • Syntax Highlighting
  • Minify CSS/JS/HTML

Code

echo "hello world"
package main
import "fmt"
func main() {
    fmt.Println("hello world")
}
console.log("hello world");
#include <stdio.h>
int main() {
    printf("hello world\n");
    return 0;
}
SELECT * FROM users WHERE id = 1;

Commands

Included is a basic markdown2html command

markdown2html README.md
# Outputs:
# /tmp/markdown2html_README.html
# open browser
xdg-open file:///$(markdown2html README.md)

About

markdown to html (go, exported for c library)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages