sitetheme

package module
v0.1.2 Latest Latest
Warning

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

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

README

sitetheme

Mapea el contenido editable (veltylabs/site_content) a la plantilla de aterrizaje (github.com/tinywasm/layout/landing), generando artefactos de SEO (JSON-LD) y resúmenes para IA (llms.txt).

Inicio Rápido

Instalación
go get github.com/veltylabs/sitetheme
Funciones Principales

sitetheme exporta tres funciones puras:

// Landing arma la página del sitio a partir de su contenido. domain es el
// dominio público del sitio (sin esquema), usado para construir los
// canonical URL; no vive en sitecontent.Content porque no es contenido
// editable por el cliente.
func Landing(c sitecontent.Content, domain string) *landing.Page

// JSONLD produce el documento schema.org del rubro declarado en c.SEO.
func JSONLD(c sitecontent.Content) string

// LLMsTxt produce el resumen en markdown que leen los motores generativos.
func LLMsTxt(c sitecontent.Content) string

Ejemplo de Uso

package main

import (
	"fmt"
	"github.com/veltylabs/site_content"
	"github.com/veltylabs/sitetheme"
)

func main() {
	content := sitecontent.Content{
		Brand: sitecontent.Brand{Name: "Mi Negocio"},
		Seo:   sitecontent.SEO{Description: "Bienvenido a Mi Negocio"},
	}

	page := sitetheme.Landing(content, "minegocio.cl")
	pages := page.RenderPages()

	for _, p := range pages {
		fmt.Printf("Ruta: %s, Título: %s\n", p.Path, p.Doc.Title)
	}

	jsonld := sitetheme.JSONLD(content)
	llmstxt := sitetheme.LLMsTxt(content)

	fmt.Println("JSON-LD:", jsonld)
	fmt.Println("llms.txt:", llmstxt)
}

Arquitectura

Consulta la documentación detallada en docs/ARCHITECTURE.md.

Documentation

Index

Constants

View Source
const (
	ImagePathPrefix = "/img/"

	AnchorHero     = "hero"
	AnchorAbout    = "nosotros"
	AnchorServices = "servicios"
	AnchorStats    = "estadisticas"
	AnchorForm     = "contacto"
	AnchorHours    = "horarios"
	AnchorMap      = "mapa"

	NavLabelHero     = "Inicio"
	NavLabelAbout    = "Nosotros"
	NavLabelServices = "Servicios"
	NavLabelStats    = "Métricas"
	NavLabelForm     = "Contacto"
	NavLabelHours    = "Horarios"
	NavLabelMap      = "Ubicación"

	FormTitleDefault = "Contacto"
	FormIntroDefault = "Envíanos un mensaje y te responderemos a la brevedad."

	ServicesPathPrefix = "/servicios/"
)

Variables

This section is empty.

Functions

func JSONLD added in v0.1.0

func JSONLD(c sitecontent.Content) string

func LLMsTxt added in v0.1.0

func LLMsTxt(c sitecontent.Content) string

func Landing added in v0.1.0

func Landing(c sitecontent.Content, domain string) *landing.Page

Landing arma la pagina del sitio a partir de su contenido. domain es el dominio publico del sitio (sin esquema, ej. "clinicasanjose.cl"): no vive en sitecontent.Content porque es un dato de infraestructura, no contenido editable por el cliente, y se usa para construir los canonical URL.

Types

This section is empty.

Jump to

Keyboard shortcuts

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