build

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 43 Imported by: 0

Documentation

Overview

Package build orchestrates the end-to-end Obsite site build pipeline.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeVaultPath

func NormalizeVaultPath(vaultPath string) (string, error)

NormalizeVaultPath validates the vault path and returns its absolute form.

Types

type BuildResult

type BuildResult struct {
	OutputPath   string
	Index        *model.VaultIndex
	Graph        *model.LinkGraph
	Assets       map[string]*model.Asset
	Diagnostics  []diag.Diagnostic
	NotePages    int
	TagPages     int
	RecentNotes  []model.NoteSummary
	WarningCount int
	ErrorCount   int
}

BuildResult exposes the key outputs that later CLI work needs from a build.

func BuildWithOptions

func BuildWithOptions(input SiteInput, vaultPath string, outputPath string, options Options) (*BuildResult, error)

BuildWithOptions runs the full Obsite site-generation pipeline from a build.SiteInput contract.

type CacheManifest

type CacheManifest struct {
	Version              int                          `json:"version"`
	BuildABISignature    string                       `json:"buildABISignature"`
	ConfigSignature      string                       `json:"configSignature"`
	TemplateSignature    string                       `json:"templateSignature"`
	SearchIndexSignature string                       `json:"searchIndexSignature,omitempty"`
	Graph                model.LinkGraph              `json:"graph"`
	Pages                map[string]string            `json:"pages,omitempty"`
	Notes                map[string]cacheManifestNote `json:"notes"`
}

CacheManifest stores the incremental-build state that can be safely reused on the next run.

type Options

type Options struct {
	Force             bool
	DiagnosticsWriter io.Writer
}

Options controls build-time behavior that should remain stable across the CLI and serve paths.

type SiteInput

type SiteInput struct {
	Config model.SiteConfig
}

SiteInput is the build-owned contract for site generation.

func LoadSiteInput

func LoadSiteInput(path string, overrides internalconfig.Overrides) (SiteInput, error)

LoadSiteInput loads build input using config-layer normalization.

Jump to

Keyboard shortcuts

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