Documentation
¶
Overview ¶
Package mdconv converts an extracted article node to GitHub-Flavored Markdown. Before conversion it rewrites the node's links and images through caller callbacks, so a site build can point internal links at local files or in-file anchors and the image policy can localise pictures. After conversion it tidies the Markdown: no blank-line runs, a single trailing newline.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// Base resolves relative href and src values to absolute URLs before the
// rewrite callbacks see them.
Base *url.URL
// RewriteLink maps an absolute link URL to the target written into the
// Markdown. A nil callback, or an empty return, leaves the link as the
// absolute URL.
RewriteLink func(abs string) string
// RewriteImage maps an absolute image URL (with its alt text) to the target
// written into the Markdown. A nil callback, or an empty return, leaves the
// image as the absolute URL.
RewriteImage func(abs, alt string) string
}
Options configure one conversion.
Click to show internal directories.
Click to hide internal directories.