markdown

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package markdown provides the shared Goldmark-based Markdown renderer for the Krewire ecosystem. Both mdbind (book) and framework/web/ssg + dsl use it so a docs site can start as a lightweight manuscript and progressively enhance to a full ssg site without re-parsing or duplicated dependencies. It is the leaf Package that allows mdbind and framework to be depended on together (KWF-M8K2Q, KWM-FX9H2).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrefixLinks(html, base string) string

PrefixLinks rewrites absolute href/src links so they resolve under base. Exported for book tests and progressive callers; internal prefixLinks delegates to it.

func Render

func Render(src []byte) (string, error)

Render converts Markdown src to HTML using Goldmark GFM + AutoHeadingID.

func RenderWithBase

func RenderWithBase(src []byte, base string) (string, error)

RenderWithBase converts Markdown src to HTML and rewrites absolute href/src="/*" links to be resolved under base (e.g. "/guide/"). Page links keep their extensionless form; only the site root keeps the trailing slash. When base is "/" or empty no rewriting occurs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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