model

package
v0.0.0-...-1087858 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIVersionV1 = "htmlctl.dev/v1"

	KindWebsite = "Website"
	KindPage    = "Page"

	ComponentScopeGlobal = "global"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Name string
	Path string
}

type BrandingAsset

type BrandingAsset struct {
	Slot       string
	SourcePath string
}

type Component

type Component struct {
	Name  string
	Scope string
	HTML  string
	CSS   string
	JS    string
}

type JSONLDBlock

type JSONLDBlock struct {
	ID      string         `yaml:"id" json:"id,omitempty"`
	Payload map[string]any `yaml:"payload" json:"payload,omitempty"`
}

JSONLDBlock is a single JSON-LD block emitted in input order.

type Metadata

type Metadata struct {
	Name string `yaml:"name"`
}

Metadata is shared by resource documents.

type OpenGraph

type OpenGraph struct {
	Type        string `yaml:"type" json:"type,omitempty"`
	URL         string `yaml:"url" json:"url,omitempty"`
	SiteName    string `yaml:"siteName" json:"siteName,omitempty"`
	Locale      string `yaml:"locale" json:"locale,omitempty"`
	Title       string `yaml:"title" json:"title,omitempty"`
	Description string `yaml:"description" json:"description,omitempty"`
	Image       string `yaml:"image" json:"image,omitempty"`
}

OpenGraph contains supported og:* properties in fixed declaration order.

type Page

type Page struct {
	APIVersion string   `yaml:"apiVersion"`
	Kind       string   `yaml:"kind"`
	Metadata   Metadata `yaml:"metadata"`
	Spec       PageSpec `yaml:"spec"`
}
type PageHead struct {
	CanonicalURL string            `yaml:"canonicalURL" json:"canonicalURL,omitempty"`
	Meta         map[string]string `yaml:"meta" json:"meta,omitempty"`
	OpenGraph    *OpenGraph        `yaml:"openGraph" json:"openGraph,omitempty"`
	Twitter      *TwitterCard      `yaml:"twitter" json:"twitter,omitempty"`
	JSONLD       []JSONLDBlock     `yaml:"jsonLD" json:"jsonLD,omitempty"`
}

PageHead contains optional SEO and share metadata rendered into the page head.

type PageLayoutItem

type PageLayoutItem struct {
	Include string `yaml:"include" json:"include"`
}

type PageSpec

type PageSpec struct {
	Route       string           `yaml:"route"`
	Title       string           `yaml:"title"`
	Description string           `yaml:"description"`
	Layout      []PageLayoutItem `yaml:"layout"`
	Head        *PageHead        `yaml:"head" json:"head,omitempty"`
}

type RobotsGroup

type RobotsGroup struct {
	UserAgents []string `yaml:"userAgents" json:"userAgents"`
	Allow      []string `yaml:"allow,omitempty" json:"allow,omitempty"`
	Disallow   []string `yaml:"disallow,omitempty" json:"disallow,omitempty"`
}

type Site

type Site struct {
	RootDir    string
	Website    Website
	Pages      map[string]Page
	Components map[string]Component
	Styles     StyleBundle
	ScriptPath string
	Assets     []Asset
	Branding   map[string]BrandingAsset
}

type StyleBundle

type StyleBundle struct {
	Name       string
	TokensCSS  string
	DefaultCSS string
}

type TwitterCard

type TwitterCard struct {
	Card        string `yaml:"card" json:"card,omitempty"`
	URL         string `yaml:"url" json:"url,omitempty"`
	Title       string `yaml:"title" json:"title,omitempty"`
	Description string `yaml:"description" json:"description,omitempty"`
	Image       string `yaml:"image" json:"image,omitempty"`
}

TwitterCard contains supported twitter:* properties in fixed declaration order.

type Website

type Website struct {
	APIVersion string      `yaml:"apiVersion"`
	Kind       string      `yaml:"kind"`
	Metadata   Metadata    `yaml:"metadata"`
	Spec       WebsiteSpec `yaml:"spec"`
}

type WebsiteHead

type WebsiteHead struct {
	Icons *WebsiteIcons `yaml:"icons,omitempty" json:"icons,omitempty"`
}

type WebsiteIcons

type WebsiteIcons struct {
	SVG        string `yaml:"svg,omitempty" json:"svg,omitempty"`
	ICO        string `yaml:"ico,omitempty" json:"ico,omitempty"`
	AppleTouch string `yaml:"appleTouch,omitempty" json:"appleTouch,omitempty"`
}

type WebsiteLLMsTxt

type WebsiteLLMsTxt struct {
	Enabled bool `yaml:"enabled" json:"enabled"`
}

type WebsiteRobots

type WebsiteRobots struct {
	Enabled bool          `yaml:"enabled" json:"enabled"`
	Groups  []RobotsGroup `yaml:"groups,omitempty" json:"groups,omitempty"`
}

type WebsiteSEO

type WebsiteSEO struct {
	PublicBaseURL  string                 `yaml:"publicBaseURL" json:"publicBaseURL,omitempty"`
	DisplayName    string                 `yaml:"displayName,omitempty" json:"displayName,omitempty"`
	Description    string                 `yaml:"description,omitempty" json:"description,omitempty"`
	Robots         *WebsiteRobots         `yaml:"robots,omitempty" json:"robots,omitempty"`
	Sitemap        *WebsiteSitemap        `yaml:"sitemap,omitempty" json:"sitemap,omitempty"`
	LLMsTxt        *WebsiteLLMsTxt        `yaml:"llmsTxt,omitempty" json:"llmsTxt,omitempty"`
	StructuredData *WebsiteStructuredData `yaml:"structuredData,omitempty" json:"structuredData,omitempty"`
}

type WebsiteSitemap

type WebsiteSitemap struct {
	Enabled bool `yaml:"enabled" json:"enabled"`
}

type WebsiteSpec

type WebsiteSpec struct {
	DefaultStyleBundle string       `yaml:"defaultStyleBundle"`
	BaseTemplate       string       `yaml:"baseTemplate"`
	Head               *WebsiteHead `yaml:"head,omitempty" json:"head,omitempty"`
	SEO                *WebsiteSEO  `yaml:"seo,omitempty" json:"seo,omitempty"`
}

type WebsiteStructuredData

type WebsiteStructuredData struct {
	Enabled bool `yaml:"enabled" json:"enabled"`
}

Jump to

Keyboard shortcuts

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