cmd

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 54 Imported by: 0

Documentation

Overview

build.go implements the core mdpress build command. It loads config, resolves sources, and dispatches document generation. Both local directories and GitHub repositories are supported, including zero-config discovery mode.

completion.go implements the shell completion command for mdpress. It generates shell completion scripts for bash, zsh, fish, and powershell.

init_cmd.go implements the init subcommand. It scans Markdown files, extracts structure and titles, and generates book.yaml. When the target directory is empty it creates starter files. Interactive mode collects project metadata, with sensible defaults for non-interactive terminals.

migrate.go implements the `mdpress migrate` command.

It detects a GitBook / HonKit project in the given directory, converts book.json to book.yaml, rewrites GitBook-specific template tags in Markdown files, and prints a migration report.

quickstart.go implements the quickstart subcommand. It creates a complete sample book project so users can see results quickly. The command generates book.yaml, README.md, sample chapters, image placeholders, and next-step instructions.

serve.go implements the local live preview server. It watches files, rebuilds HTML on change, and pushes reload events over WebSocket.

upgrade.go implements the upgrade subcommand. It checks for newer versions of mdpress from GitHub releases and optionally installs them.

validate.go implements the validate subcommand. It checks the book config, referenced files, and image paths, then prints a readable validation report.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is overridden at build time via -ldflags.
	Version = "0.7.1"
	// BuildTime is overridden at build time via -ldflags.
	BuildTime = "unknown"
)

Functions

func Execute

func Execute() error

Execute runs the root command.

Types

This section is empty.

Jump to

Keyboard shortcuts

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