Documentation
¶
Overview ¶
Package seo derives deterministic page metadata, structured data, and site-level SEO artifacts such as sitemap.xml and robots.txt for rendered pages. Sitemap generation consumes page canonical URLs plus explicit page last-modified timestamps. Note-page Article JSON-LD falls back from frontmatter date to the note's normalized source timestamp before failing closed on any still-missing required schema fields, while valid BreadcrumbList JSON-LD remains emitted and site title provides the deterministic author fallback when an explicit site author is absent.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRSS ¶
func BuildRSS(cfg model.SiteConfig, notes []model.NoteSummary) ([]byte, error)
BuildRSS renders a deterministic RSS 2.0 feed for published notes.
func BuildRobots ¶
BuildRobots renders a permissive robots.txt with an absolute sitemap URL.
Types ¶
type ArticleJSONLDError ¶
type ArticleJSONLDError struct {
MissingFields []string
}
ArticleJSONLDError reports which required Article JSON-LD fields are missing.
func (*ArticleJSONLDError) Error ¶
func (e *ArticleJSONLDError) Error() string
type Metadata ¶
type Metadata struct {
Title string
Description string
Canonical string
OG model.OpenGraph
TwitterCard string
}
Metadata contains the template-safe SEO fields derived for a single page.
func Apply ¶
Apply derives SEO metadata and copies the fields used by templates into PageData.
Page-level SEO metadata is always written into PageData. Note pages still return an error when their required Article JSON-LD fields are incomplete; any valid structured data that was serialized alongside that error remains in PageData.JSONLD and the rest of the metadata is still applied.