mmarkdownext

package
v0.0.0-...-94ee829 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 9 Imported by: 3

Documentation

Overview

Package mmarkdownext provides an extended version of Markdown that does several passes to add additional niceties like adding footnotes and allowing Go template helpers to be used..

Index

Constants

This section is empty.

Variables

View Source
var FuncMap = template.FuncMap{}

FuncMap is the map of helper functions that will be used when passing the Markdown through a Go template step.

Functions

func Render

func Render(s string, options *RenderOptions) (string, error)

Render a Markdown string to HTML while applying all custom project-specific filters including footnotes and stable header links.

Types

type RenderOptions

type RenderOptions struct {
	// AbsoluteURL is the absolute URL of the final site. If set, the Markdown
	// renderer replaces the sources of any images or links that pointed to
	// relative URLs with absolute URLs.
	AbsoluteURL string

	// NoFollow adds `rel="nofollow"` to any external links.
	NoFollow bool

	// NoFootnoteLinks disables linking to and from footnotes.
	NoFootnoteLinks bool

	// NoHeaderLinks disables automatic permalinks on headers.
	NoHeaderLinks bool

	// NoRetina disables the Retina.JS rendering attributes.
	NoRetina bool

	// TemplateData is data injected while rendering Go templates.
	TemplateData interface{}
}

RenderOptions describes a rendering operation to be customized.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL