docs

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

templ: version: v0.3.924

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Directory added in v0.6.0

type Directory struct {
	Name        string
	Docs        []Doc
	Directories []Directory
}

Directory represents a single directory containing markdown documentation files.

func LoadDir added in v0.6.0

func LoadDir(dirpath string) (*Directory, error)

LoadDir recursively loads all markdown files from the given path. All file content is automatically transformed to HTML.

func (*Directory) Entries added in v0.6.0

func (d *Directory) Entries() iter.Seq2[[]string, Doc]

Entries returns an iterator over each document in the directory and it's sub-directories, and a slice of the parent directory names, that can be used to resolve the filepath.

type Doc

type Doc struct {
	Name string
	// An HTML representation of the original markdown file content
	Content string
}

Doc represents a single markdown documentation file

func (Doc) Page

func (d Doc) Page(options options.Options, root Directory, parents []string, httpMode bool) templ.Component

type LocalLinkTransformer

type LocalLinkTransformer struct{}

func (*LocalLinkTransformer) Transform

func (t *LocalLinkTransformer) Transform(doc *ast.Document, reader text.Reader, pc parser.Context)

Jump to

Keyboard shortcuts

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