theme

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package theme resolves and loads HTML theme templates. Lookup order is project-local ./themes/<name>.html first, then the user config directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Theme

type Theme struct {
	Name     string
	Path     string
	Template *template.Template
}

Theme is a parsed theme template ready to be executed by internal/render.

func Resolve

func Resolve(name, searchProjectDir string) (*Theme, error)

Resolve finds a theme by name. searchProjectDir is typically the directory the document lives in; the function looks for <searchProjectDir>/themes/<name>.html first and falls back to <UserConfigDir>/mdoc/themes/<name>.html. An empty name yields a minimal default theme that just emits {{.Body}}.

Jump to

Keyboard shortcuts

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