config

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterConfig

type AdapterConfig struct {
	Name   AdapterName            `toml:"name"`
	Config map[string]interface{} `toml:"config"`
}

type AdapterName

type AdapterName string
const (
	AdapterStandalone AdapterName = "standalone"
	AdapterCloudflare AdapterName = "cloudflare"
	AdapterNetlify    AdapterName = "netlify"
	AdapterVercel     AdapterName = "vercel"
)

type Config

type Config struct {
	Site           string          `toml:"site"`
	Base           string          `toml:"base"`
	OutDir         string          `toml:"outDir"`
	SrcDir         string          `toml:"srcDir"`
	PackageManager string          `toml:"packageManager"`
	Output         OutputConfig    `toml:"output"`
	Server         ServerConfig    `toml:"server"`
	Adapter        AdapterConfig   `toml:"adapter"`
	Lifecycle      LifecycleConfig `toml:"lifecycle"`
	Plugins        []PluginConfig  `toml:"plugins"`
	Markdown       MarkdownConfig  `toml:"markdown"`
	Content        ContentConfig   `toml:"content"`
}

func DefaultConfig

func DefaultConfig() *Config

func Load

func Load(path string) (*Config, error)

func LoadFromDir

func LoadFromDir(dir string) (*Config, error)

func (*Config) IsHybrid

func (c *Config) IsHybrid() bool

func (*Config) IsSSR

func (c *Config) IsSSR() bool

func (*Config) IsStatic

func (c *Config) IsStatic() bool

func (*Config) Validate

func (c *Config) Validate() error

type ContentConfig

type ContentConfig struct {
	Collections bool   `toml:"collections"`
	ContentDir  string `toml:"contentDir"`
}

type LifecycleConfig

type LifecycleConfig struct {
	Enabled         bool `toml:"enabled"`
	StartupTimeout  int  `toml:"startupTimeout"`
	ShutdownTimeout int  `toml:"shutdownTimeout"`
}

type MarkdownConfig

type MarkdownConfig struct {
	SyntaxHighlight string   `toml:"syntaxHighlight"`
	RemarkPlugins   []string `toml:"remarkPlugins"`
	RehypePlugins   []string `toml:"rehypePlugins"`
}

type OutputConfig

type OutputConfig struct {
	Type OutputType `toml:"type"`
}

type OutputType

type OutputType string
const (
	OutputStatic OutputType = "static"
	OutputServer OutputType = "server"
	OutputHybrid OutputType = "hybrid"
)

type PluginConfig

type PluginConfig struct {
	Name   string                 `toml:"name"`
	Config map[string]interface{} `toml:"config"`
}

type ServerConfig

type ServerConfig struct {
	Port int    `toml:"port"`
	Host string `toml:"host"`
}

Jump to

Keyboard shortcuts

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