Documentation
¶
Index ¶
- func SyncAssets(cfg *config.Config, hooks AssetHookRunner) error
- func WriteBuildReport(cfg *config.Config, graph *content.SiteGraph, target string, preview bool, ...) error
- func WritePreviewManifest(cfg *config.Config, graph *content.SiteGraph, target string, enabled bool) error
- type AssetHookRunner
- type BuildReport
- type DiagnosticReport
- type GraphLoader
- type PreparedGraph
- type PreviewLink
- type PreviewManifest
- type RouteHookRunner
- type TimedRouteHooks
- type TimingBreakdown
- func BuildFeedsWithTiming(cfg *config.Config, graph *content.SiteGraph) (TimingBreakdown, error)
- func BuildRendererWithTiming(ctx context.Context, r *renderer.Renderer, graph *content.SiteGraph) (TimingBreakdown, error)
- func LoadGraphWithTiming(ctx context.Context, loader site.Loader, resolver *router.Resolver, ...) (*content.SiteGraph, TimingBreakdown, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SyncAssets ¶
func SyncAssets(cfg *config.Config, hooks AssetHookRunner) error
SyncAssets runs the asset pipeline with Foundry's standard diagnostic wrapping.
Types ¶
type AssetHookRunner ¶
AssetHookRunner represents asset-build hooks.
type BuildReport ¶
type BuildReport struct {
GeneratedAt time.Time `json:"generated_at"`
Environment string `json:"environment"`
Target string `json:"target,omitempty"`
Preview bool `json:"preview"`
DocumentCount int `json:"document_count"`
RouteCount int `json:"route_count"`
Stats renderer.BuildStats `json:"stats"`
}
BuildReport is the persisted operational summary for the most recent build.
type DiagnosticReport ¶
type DiagnosticReport struct {
BrokenMediaRefs []string
BrokenInternalLinks []string
MissingTemplates []string
OrphanedMedia []string
DuplicateURLs []string
DuplicateSlugs []string
TaxonomyInconsistency []string
}
DiagnosticReport aggregates site-level validation findings discovered outside the strict config/theme validators.
func AnalyzeSite ¶
func AnalyzeSite(cfg *config.Config, graph *content.SiteGraph) DiagnosticReport
AnalyzeSite inspects the loaded graph and supporting files for operational issues such as broken references, missing templates, and orphaned media.
func (DiagnosticReport) Messages ¶
func (r DiagnosticReport) Messages() []string
Messages flattens all diagnostic categories into a single ordered message slice suitable for CLI output.
type GraphLoader ¶
GraphLoader loads the site graph for operational helpers.
type PreparedGraph ¶
PreparedGraph combines the loaded site graph with its dependency graph.
func LoadPreparedGraph ¶
func LoadPreparedGraph(ctx context.Context, loader GraphLoader, resolver *router.Resolver, hooks RouteHookRunner, activeTheme string) (*PreparedGraph, error)
LoadPreparedGraph loads the graph, assigns routes, runs route hooks, and builds the dependency graph used by preview rebuilds.
type PreviewLink ¶
type PreviewLink struct {
Title string `json:"title"`
Status string `json:"status"`
Type string `json:"type"`
Lang string `json:"lang"`
SourcePath string `json:"source_path"`
URL string `json:"url"`
PreviewURL string `json:"preview_url"`
}
PreviewLink identifies a previewable document emitted into preview-links.json.
type PreviewManifest ¶
type PreviewManifest struct {
GeneratedAt time.Time `json:"generated_at"`
Environment string `json:"environment"`
Target string `json:"target,omitempty"`
Links []PreviewLink `json:"links"`
}
PreviewManifest is the preview-links.json payload written during preview builds.
type RouteHookRunner ¶
RouteHookRunner represents post-routing hooks that must run before serving or rendering.
type TimedRouteHooks ¶
type TimedRouteHooks struct {
Hooks site.RouteHooks
Duration time.Duration
}
TimedRouteHooks wraps site route hooks and records how long they take.
func (*TimedRouteHooks) OnRoutesAssigned ¶
func (h *TimedRouteHooks) OnRoutesAssigned(graph *content.SiteGraph) error
type TimingBreakdown ¶
type TimingBreakdown struct {
PluginConfig time.Duration
Loader time.Duration
Router time.Duration
RouteHooks time.Duration
Assets time.Duration
Renderer time.Duration
Feed time.Duration
}
TimingBreakdown records high-level build timings for diagnostics and doctor output.
func BuildFeedsWithTiming ¶
BuildFeedsWithTiming runs feed generation and records its duration.
func BuildRendererWithTiming ¶
func BuildRendererWithTiming(ctx context.Context, r *renderer.Renderer, graph *content.SiteGraph) (TimingBreakdown, error)
BuildRendererWithTiming runs the renderer build pass and records its timing.
func LoadGraphWithTiming ¶
func LoadGraphWithTiming(ctx context.Context, loader site.Loader, resolver *router.Resolver, hooks site.RouteHooks) (*content.SiteGraph, TimingBreakdown, error)
LoadGraphWithTiming loads the site graph, assigns URLs, and records coarse timing for those stages.