Documentation
¶
Overview ¶
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
Index ¶
- func AssetHref(assetBaseURL, href string) string
- func BootstrapHydrationScript(assetMode string, assetBaseURL string, sharedDataBase string, ...) templ.Component
- func BootstrapSharedNavCacheScript(assetBaseURL string, sharedDataBase string, sharedDataHash string) templ.Component
- func Breadcrumb(baseURL string, items []BreadcrumbItem) templ.Component
- func BuildTagParentMap(tags []*ppmodel.NavTag) map[string]*ppmodel.NavTag
- func CodeSamplePanel(sample *ppmodel.CodeSample) templ.Component
- func CodeSamplesSection(samples []*ppmodel.CodeSample) templ.Component
- func CommonHeadersSection(headers []*ppmodel.HeaderInfo, headersJSON string, baseURL string) templ.Component
- func DiagnosticsPageTempl(page *ppmodel.DiagnosticsPage) templ.Component
- func DocHref(baseURL, href string) string
- func GraphJSONScript(graphJSON string) templ.Component
- func Head(title string, baseURL string, assetBaseURL string, sharedAssetBaseURL string, ...) templ.Component
- func InlineExamples(mt *ppmodel.MediaTypeInfo) templ.Component
- func Layout(pageTitle string, siteTitle string, baseURL string, assetBaseURL string, ...) templ.Component
- func LayoutPage(params LayoutPageParams, content templ.Component) templ.Component
- func MermaidDiagramScript(diagram string) templ.Component
- func ModelPageTempl(page *ppmodel.ModelPage, baseURL string) templ.Component
- func ModelTypeIndexTempl(group *ppmodel.NavModelGroup, breadcrumb []BreadcrumbItem, baseURL string) templ.Component
- func ModelsIndexTempl(groups []*ppmodel.NavModelGroup, breadcrumb []BreadcrumbItem, baseURL string) templ.Component
- func MustJSON(v any) string
- func NavTagItem(tag *ppmodel.NavTag, baseURL string) templ.Component
- func NavTempl(tags []*ppmodel.NavTag, models map[string][]*ppmodel.ModelPage, baseURL string) templ.Component
- func OperationPageTempl(page *ppmodel.OperationPage, baseURL string) templ.Component
- func RequestBodySection(rb *ppmodel.RequestBodyInfo, baseURL string) templ.Component
- func RootOperationItem(op *ppmodel.NavOperation, baseURL string) templ.Component
- func RootPageTempl(page *ppmodel.RootPage, baseURL string) templ.Component
- func RootTagSection(tag *ppmodel.NavTag, depth int, baseURL string) templ.Component
- func SecuritySchemeTypeBadge(sec *ppmodel.SecurityRequirement) templ.Component
- func SharedAssetHref(sharedAssetBaseURL, assetBaseURL, href string) string
- func TagIndexTempl(tag *ppmodel.NavTag, breadcrumb []BreadcrumbItem, baseURL string) templ.Component
- func ViolationStats(scopeLabel string) templ.Component
- func WriteFooter(w io.Writer, footer *ppmodel.FooterConfig) error
- type BreadcrumbItem
- type LayoutPageParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssetHref ¶ added in v0.0.54
AssetHref resolves a relative asset reference against the configured hosted docs root. When no hosted docs root is configured, the original relative asset path is preserved.
func BootstrapSharedNavCacheScript ¶ added in v0.0.55
func Breadcrumb ¶
func Breadcrumb(baseURL string, items []BreadcrumbItem) templ.Component
func BuildTagParentMap ¶
BuildTagParentMap walks the NavTag tree once and returns a map from tag name to parent NavTag.
func CodeSamplePanel ¶ added in v0.0.69
func CodeSamplePanel(sample *ppmodel.CodeSample) templ.Component
func CodeSamplesSection ¶ added in v0.0.69
func CodeSamplesSection(samples []*ppmodel.CodeSample) templ.Component
func CommonHeadersSection ¶
func DiagnosticsPageTempl ¶ added in v0.0.61
func DiagnosticsPageTempl(page *ppmodel.DiagnosticsPage) templ.Component
func DocHref ¶ added in v0.0.55
DocHref resolves a document link against the configured hosted docs root. Portable pages preserve the original relative href so the page's <base href> continues to handle nested file:// navigation correctly.
func GraphJSONScript ¶
func InlineExamples ¶
func InlineExamples(mt *ppmodel.MediaTypeInfo) templ.Component
func Layout ¶
func Layout(pageTitle string, siteTitle string, baseURL string, assetBaseURL string, sharedAssetBaseURL string, activeSlug string, specFormat string, assetMode string, sharedDataBase string, pageDataBase string, vizGraphDataBase string, vizDiagramDataBase string, extraCSS []string, lite bool, developerMode bool, content templ.Component) templ.Component
func LayoutPage ¶ added in v0.0.55
func LayoutPage(params LayoutPageParams, content templ.Component) templ.Component
LayoutPage renders the shared printing press shell with optional aggregate header context.
func MermaidDiagramScript ¶
func ModelTypeIndexTempl ¶
func ModelTypeIndexTempl(group *ppmodel.NavModelGroup, breadcrumb []BreadcrumbItem, baseURL string) templ.Component
func ModelsIndexTempl ¶
func ModelsIndexTempl(groups []*ppmodel.NavModelGroup, breadcrumb []BreadcrumbItem, baseURL string) templ.Component
func OperationPageTempl ¶
func OperationPageTempl(page *ppmodel.OperationPage, baseURL string) templ.Component
func RequestBodySection ¶
func RequestBodySection(rb *ppmodel.RequestBodyInfo, baseURL string) templ.Component
func RootOperationItem ¶
func RootOperationItem(op *ppmodel.NavOperation, baseURL string) templ.Component
func RootTagSection ¶
func SecuritySchemeTypeBadge ¶
func SecuritySchemeTypeBadge(sec *ppmodel.SecurityRequirement) templ.Component
func SharedAssetHref ¶ added in v0.0.64
SharedAssetHref resolves an asset reference, preferring sharedAssetBaseURL for paths that live in the renderer's embedded static tree (any href whose first segment is the static directory). Falls back to AssetHref otherwise.
This is how generated HTML references the JS bundle, CSS, fonts, and icons at a host-mounted shared URL while keeping per-artifact references relative.
func TagIndexTempl ¶
func ViolationStats ¶ added in v0.0.61
func WriteFooter ¶ added in v0.0.61
func WriteFooter(w io.Writer, footer *ppmodel.FooterConfig) error
WriteFooter renders the configured pb33f footer. A nil config means the default footer is enabled; a config with Disabled set suppresses it.
Types ¶
type BreadcrumbItem ¶
BreadcrumbItem represents a single breadcrumb navigation entry.
func ModelTypeIndexBreadcrumb ¶
func ModelTypeIndexBreadcrumb(typeName string) []BreadcrumbItem
ModelTypeIndexBreadcrumb builds the breadcrumb for a model type index page.
func ModelsIndexBreadcrumb ¶
func ModelsIndexBreadcrumb() []BreadcrumbItem
ModelsIndexBreadcrumb builds the breadcrumb for the models index page.
func TagIndexBreadcrumb ¶
func TagIndexBreadcrumb(tag *ppmodel.NavTag, tagParentMap map[string]*ppmodel.NavTag) []BreadcrumbItem
TagIndexBreadcrumb builds the breadcrumb for a tag index page using a pre-computed parent map.
type LayoutPageParams ¶ added in v0.0.55
type LayoutPageParams struct {
PageTitle string
SiteTitle string
BaseURL string
AssetBaseURL string
ActiveSlug string
SpecFormat string
AssetMode string
PageDataBase string
VizGraphDataBase string
VizDiagramDataBase string
ExtraCSS []string
Lite bool
NoMermaid bool
HeaderContext *ppmodel.SiteHeaderContext
Embedded bool
DeveloperMode bool
DocumentID string
DocsExpiresAt string
ArchiveExportURL string
}
LayoutPageParams holds the full page chrome for a rendered HTML page.