mdbind

module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT

README

mdbind — The Runvil Site Builder

mdbind assembles folders of Markdown into book-shaped static websites with a table of contents, ordered chapters, and prev/next navigation. It is the first dogfooding consumer of the Runvil Web Framework and is itself the engine behind the Runvil website.

Features

  • Book-shaped output — ordered chapters, table of contents, prev/next navigation.
  • Markdown native — renders Markdown (GFM) with a pure-Go processor.
  • Static export — a complete website out of one folder, via framework/web.
  • Library or CLI — book.Build powers both mdbind and downstream projects.
  • Dogfooded — built on runvil/framework and runvil/libs, following their conventions.

Workspace Layout

Path Description
book/ The site builder: loading, rendering, export.
cmd/mdbind/ The mdbind command-line interface.
internal/commands/ CLI sub-commands (build, init, serve).
docs/ Specifications (RVM-*).

Getting Started

Prerequisites
  • Go toolchain 1.22 or newer — see go.dev/dl
Building
go build ./...
go test ./...
Using the CLI

Scaffold a sample manuscript, then build it:

mdbind init
mdbind build --title "My Book" --author "Me"
open site/index.html

Preview during development:

mdbind serve --addr :8080

Settings honor the Runvil precedence convention: flags > MDBIND_* environment variables > defaults (MDBIND_INPUT, MDBIND_OUTPUT, MDBIND_TITLE, MDBIND_AUTHOR, MDBIND_BASE, MDBIND_ADDR). Pass --base /guide/ to build a site that will be served under a URL subdirectory.

Using the library
created, err := book.Build(book.Config{
    Input:  "manuscript",
    Output: "site",
    Title:  "My Book",
    Author: "Me",
})

Specifications

Formal requirements live under docs/specs/. Start with the initial specification and the CLI & Workflows.

  • framework — Runvil meta-framework (cli, web).
  • libs — shared primitives (core, term).
  • docs — the Runvil website, built with mdbind.

License

MIT — see LICENSE.

Directories

Path Synopsis
Package book assembles Markdown manuscripts into book-shaped websites using the Runvil web framework.
Package book assembles Markdown manuscripts into book-shaped websites using the Runvil web framework.
cmd
mdbind command
The mdbind CLI: the Runvil site builder.
The mdbind CLI: the Runvil site builder.
internal
commands
Package commands implements the mdbind CLI sub-commands.
Package commands implements the mdbind CLI sub-commands.
version
Package version reports the mdbind CLI version.
Package version reports the mdbind CLI version.

Jump to

Keyboard shortcuts

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