docs

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package docs validates the documentation content contract for docs/.

The docs/ directory is plain CommonMark + GitHub-flavored Markdown with no rendering toolchain in this repository; a separate repository consumes it and builds the documentation site. This package enforces the contract that consumer relies on:

  • every page parses as Markdown and starts with exactly one level-1 heading (the page title)
  • every relative link and image resolves to a file inside docs/, and anchor fragments resolve to a heading in the target page
  • every page appears exactly once in toc.yaml, either in a section or in the unlisted set, and every toc.yaml entry names a real page
  • no raw HTML or JSX except HTML comments
  • no MyST/Sphinx directives left over from the old toolchain

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Problem

type Problem struct {
	File    string
	Line    int
	Message string
}

A Problem is a single contract violation, located by file (relative to the docs root) and 1-based line number.

func Lint

func Lint(root string) ([]Problem, error)

Lint validates every Markdown file under root against the content contract and cross-checks the set of files against root/toc.yaml.

func (Problem) String

func (p Problem) String() string

Jump to

Keyboard shortcuts

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