docpage

package
v0.86.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package docpage is the SDK reference's docs page: the section menu rail, the article column, and an optional contents rail, collapsing to one column on phones. The look lives in sdkdocs-docpage.style.css, an owned style; `gofastr gen styles` writes the class methods in sdkdocs-docpage_style.gen.go.

sdkdocs is framework code and cannot import an example, so it keeps its own copy of the docs page an app draws for itself (examples/acme-site/helpdocs). The package is internal so the generated Style handle is not framework API.

Index

Constants

This section is empty.

Variables

View Source
var Style = sdkdocsDocpageStyle{ownstyle.Must("sdkdocs-docpage", ownstyle.KindScoped, sdkdocsDocpageCSS)}

Style is the sdkdocs-docpage owned style, registered at init. This package holds exactly one style file, so the handle is exported as Style; a package holding several exports each as <Owner>Style.

Functions

func Render

func Render(cfg Config, body ...render.HTML) render.HTML

Render draws the page around body.

Types

type Config

type Config struct {
	// Nav is the left rail (interactive.SectionMenu).
	Nav render.HTML
	// Toc is the optional right rail (an in-page table of contents).
	// An empty value releases the column, including after a soft
	// navigation.
	Toc render.HTML
	// Crumbs is the trail above the article body.
	Crumbs []ui.Crumb
}

Config holds the page's regions.

Jump to

Keyboard shortcuts

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