Help us shape the future of Go! Take the 2026 Go Developer Survey

pages

package
v3.1.61 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: MIT, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashConfig

func HashConfig(content []byte) string

HashConfig returns a SHA256 hash of the config content for change detection

func IsValidTemplate

func IsValidTemplate(name string) bool

IsValidTemplate checks if a template name is valid

func TemplateDisplayNames

func TemplateDisplayNames() map[string]string

TemplateDisplayNames returns a map of template names to display names

func ValidTemplates

func ValidTemplates() []string

ValidTemplates returns the list of valid template names

Types

type AdvancedConfig

type AdvancedConfig struct {
	CustomCSS      string            `yaml:"custom_css,omitempty"`
	CustomHead     string            `yaml:"custom_head,omitempty"`
	Redirects      map[string]string `yaml:"redirects,omitempty"`
	PublicReleases bool              `yaml:"public_releases,omitempty"`
}

AdvancedConfig represents advanced settings

type AnalyticsConfig

type AnalyticsConfig struct {
	Plausible       string      `yaml:"plausible,omitempty"`
	Umami           UmamiConfig `yaml:"umami,omitempty"`
	GoogleAnalytics string      `yaml:"google_analytics,omitempty"`
}

AnalyticsConfig represents analytics settings

type BrandConfig

type BrandConfig struct {
	Name    string `yaml:"name,omitempty"`
	LogoURL string `yaml:"logo_url,omitempty"`
	Tagline string `yaml:"tagline,omitempty"`
}

BrandConfig represents brand/identity settings

type CTAButton

type CTAButton struct {
	Label   string `yaml:"label,omitempty"`
	URL     string `yaml:"url,omitempty"`
	Variant string `yaml:"variant,omitempty"` // primary, secondary, outline, text
}

CTAButton represents a call-to-action button

type CTASectionConfig

type CTASectionConfig struct {
	Headline    string    `yaml:"headline,omitempty"`
	Subheadline string    `yaml:"subheadline,omitempty"`
	Button      CTAButton `yaml:"button,omitempty"`
}

CTASectionConfig represents the final CTA section

type FeatureConfig

type FeatureConfig struct {
	Title       string `yaml:"title,omitempty"`
	Description string `yaml:"description,omitempty"`
	Icon        string `yaml:"icon,omitempty"`
	ImageURL    string `yaml:"image_url,omitempty"`
}

FeatureConfig represents a single feature item

type FooterConfig

type FooterConfig struct {
	Links         []FooterLink `yaml:"links,omitempty"`
	Social        []SocialLink `yaml:"social,omitempty"`
	Copyright     string       `yaml:"copyright,omitempty"`
	ShowPoweredBy bool         `yaml:"show_powered_by,omitempty"`
}

FooterConfig represents footer settings

type FooterLink struct {
	Label string `yaml:"label,omitempty"`
	URL   string `yaml:"url,omitempty"`
}

FooterLink represents a single footer link

type HeroConfig

type HeroConfig struct {
	Headline     string    `yaml:"headline,omitempty"`
	Subheadline  string    `yaml:"subheadline,omitempty"`
	PrimaryCTA   CTAButton `yaml:"primary_cta,omitempty"`
	SecondaryCTA CTAButton `yaml:"secondary_cta,omitempty"`
	ImageURL     string    `yaml:"image_url,omitempty"`
	CodeExample  string    `yaml:"code_example,omitempty"`
	VideoURL     string    `yaml:"video_url,omitempty"`
}

HeroConfig represents hero section settings

type LandingConfig

type LandingConfig struct {
	Enabled       bool   `yaml:"enabled"`
	PublicLanding bool   `yaml:"public_landing"`
	Template      string `yaml:"template"` // open-source-hero, minimalist-docs, saas-conversion, bold-marketing

	// Custom domain (optional)
	Domain string `yaml:"domain,omitempty"`

	// Brand configuration
	Brand BrandConfig `yaml:"brand,omitempty"`

	// Hero section
	Hero HeroConfig `yaml:"hero,omitempty"`

	// Stats/metrics
	Stats []StatConfig `yaml:"stats,omitempty"`

	// Value propositions
	ValueProps []ValuePropConfig `yaml:"value_props,omitempty"`

	// Features
	Features []FeatureConfig `yaml:"features,omitempty"`

	// Social proof
	SocialProof SocialProofConfig `yaml:"social_proof,omitempty"`

	// Pricing (for saas-conversion template)
	Pricing PricingConfig `yaml:"pricing,omitempty"`

	// CTA section
	CTASection CTASectionConfig `yaml:"cta_section,omitempty"`

	// Footer
	Footer FooterConfig `yaml:"footer,omitempty"`

	// Theme customization
	Theme ThemeConfig `yaml:"theme,omitempty"`

	// SEO & Social
	SEO SEOConfig `yaml:"seo,omitempty"`

	// Analytics
	Analytics AnalyticsConfig `yaml:"analytics,omitempty"`

	// Advanced settings
	Advanced AdvancedConfig `yaml:"advanced,omitempty"`
}

LandingConfig represents the parsed .gitea/landing.yaml configuration

func DefaultConfig

func DefaultConfig() *LandingConfig

DefaultConfig returns a default landing page configuration

func ParseLandingConfig

func ParseLandingConfig(content []byte) (*LandingConfig, error)

ParseLandingConfig parses a landing.yaml file content

type PricingConfig

type PricingConfig struct {
	Headline    string              `yaml:"headline,omitempty"`
	Subheadline string              `yaml:"subheadline,omitempty"`
	Plans       []PricingPlanConfig `yaml:"plans,omitempty"`
}

PricingConfig represents pricing section

type PricingPlanConfig

type PricingPlanConfig struct {
	Name     string   `yaml:"name,omitempty"`
	Price    string   `yaml:"price,omitempty"`
	Period   string   `yaml:"period,omitempty"`
	Features []string `yaml:"features,omitempty"`
	CTA      string   `yaml:"cta,omitempty"`
	Featured bool     `yaml:"featured,omitempty"`
}

PricingPlanConfig represents a pricing plan

type SEOConfig

type SEOConfig struct {
	Title       string   `yaml:"title,omitempty"`
	Description string   `yaml:"description,omitempty"`
	Keywords    []string `yaml:"keywords,omitempty"`
	OGImage     string   `yaml:"og_image,omitempty"`
	TwitterCard string   `yaml:"twitter_card,omitempty"`
	TwitterSite string   `yaml:"twitter_site,omitempty"`
}

SEOConfig represents SEO and social sharing settings

type SocialLink struct {
	Platform string `yaml:"platform,omitempty"` // twitter, github, discord, linkedin, youtube
	URL      string `yaml:"url,omitempty"`
}

SocialLink represents a social media link

type SocialProofConfig

type SocialProofConfig struct {
	Logos        []string            `yaml:"logos,omitempty"`
	Testimonial  TestimonialConfig   `yaml:"testimonial,omitempty"`
	Testimonials []TestimonialConfig `yaml:"testimonials,omitempty"`
}

SocialProofConfig represents social proof section

type StatConfig

type StatConfig struct {
	Value string `yaml:"value,omitempty"`
	Label string `yaml:"label,omitempty"`
}

StatConfig represents a single stat/metric

type TestimonialConfig

type TestimonialConfig struct {
	Quote  string `yaml:"quote,omitempty"`
	Author string `yaml:"author,omitempty"`
	Role   string `yaml:"role,omitempty"`
	Avatar string `yaml:"avatar,omitempty"`
}

TestimonialConfig represents a testimonial

type ThemeConfig

type ThemeConfig struct {
	PrimaryColor string `yaml:"primary_color,omitempty"`
	AccentColor  string `yaml:"accent_color,omitempty"`
	Mode         string `yaml:"mode,omitempty"` // light, dark, auto
}

ThemeConfig represents theme customization

type UmamiConfig

type UmamiConfig struct {
	WebsiteID string `yaml:"website_id,omitempty"`
	URL       string `yaml:"url,omitempty"`
}

UmamiConfig represents Umami analytics settings

type ValuePropConfig

type ValuePropConfig struct {
	Title       string `yaml:"title,omitempty"`
	Description string `yaml:"description,omitempty"`
	Icon        string `yaml:"icon,omitempty"`
}

ValuePropConfig represents a value proposition

Source Files

  • config.go

Jump to

Keyboard shortcuts

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