Documentation
¶
Overview ¶
Package core provides consolidated default configuration functions. All feature-specific defaults are defined in their respective files (e.g., DefaultStatusConfig in status.go) and re-exported here for convenience.
Index ¶
- Constants
- Variables
- func CollectFaqTags(categories []FaqCategory) []string
- func CollectKBTags(articles []KBArticle) []string
- func CollectProjectTags(projects []Project) []string
- func GenerateSlugFromPath(relPath string) string
- func GroupComponents(components []StatusComponent) map[string][]StatusComponent
- func GroupIncidentsByMonth(incidents []Incident) map[string][]Incident
- type APIEncoding
- type APIEndpoint
- type APIExample
- type APIMediaType
- type APIOAuthFlow
- type APIOAuthFlows
- type APIParameter
- type APIPathGroup
- type APIRequestBody
- type APIResponse
- type APISchema
- type APISecurityScheme
- type APIServer
- type APIServerVariable
- type APISpec
- type APISpecSource
- type APITag
- type APITagGroup
- type AnalyticsConfig
- func (c AnalyticsConfig) GetEnabledProviders() []AnalyticsProvider
- func (c AnalyticsConfig) GetMinimalDocProvider() *AnalyticsProvider
- func (c AnalyticsConfig) HasMinimalDocFeature(feature string) bool
- func (c AnalyticsConfig) ShouldShowFeedback(pageType string) bool
- func (c AnalyticsConfig) ShouldShowNewsletter(pageType string) bool
- type AnalyticsProvider
- type BrokenLink
- type CTASection
- type ChangeCategory
- type ChangeEntry
- type ChangeType
- type ChangelogConfig
- type ChangelogPage
- type ClaudeAssistConfig
- type CollectedLink
- type ComponentStatus
- type ContactConfig
- type ContactInfo
- type ContactPage
- type FaqCategory
- type FaqConfig
- type FaqItem
- type FaqPage
- type FeatureItem
- type FeaturesSection
- type FooterBadge
- type FooterConfig
- type FooterLink
- type FooterLinkGroup
- type HTTPMethod
- type HeroButton
- type HeroSection
- type I18nConfig
- type ImageTextItem
- type ImageTextSection
- type Incident
- type IncidentSeverity
- type IncidentStatus
- type IncidentUpdate
- type KBArticle
- type KBCategory
- type KBCategoryDef
- type KBConfig
- type KBPage
- type KBSearchConfig
- type LandingConfig
- type LandingNavLink
- type LandingPage
- type LegalConfig
- type LegalPage
- type LinkCheckConfig
- type LinkCheckMode
- type LinkCheckResult
- type LinkItem
- type LinkType
- type LinksGridItem
- type LinksGridSection
- type LinksSection
- type LocaleInfo
- type LocaleSelector
- type LocalizedSite
- type MCPConfig
- type MCPPrompt
- type MCPPromptArgument
- type MCPResource
- type MCPSchema
- type MCPSpec
- type MCPTool
- type MCPToolGroup
- type Maintenance
- type MaintenanceStatus
- type Metadata
- type MetadataLink
- type NavItem
- type Navigation
- type OpenAPIConfig
- type OpenSourceSection
- type PDFExportConfig
- type Page
- type ParameterLocation
- type PortfolioConfig
- type PortfolioPage
- type Project
- type Release
- type RoadmapColumn
- type RoadmapConfig
- type RoadmapItem
- type RoadmapPage
- type SEO
- type SLAStats
- type SchemaType
- type SectionBackground
- type SecuritySchemeType
- type SimpleLink
- type Site
- type SiteConfig
- type SocialLink
- type StaleWarningConfig
- type StatusComponent
- type StatusConfig
- type StatusPage
- type StepItem
- type StepsSection
- type TOC
- type TOCItem
- type Testimonial
- type TestimonialsSection
- type TextSection
- type ThemeColorSet
- type ThemeColors
- type ThemeConfig
- type ThemeFonts
- type ThemeHero
- type UptimeConfig
- type UptimeData
- type UptimeDay
- type VersionConfig
- type VersionInfo
- type VersionSelector
- type VersionedSite
- type WaitlistConfig
- type WaitlistPage
- type WaitlistSocialLink
Constants ¶
const ( StatusSourceDir = "__status__" ChangelogSourceDir = "__changelog__" PortfolioSourceDir = "__portfolio__" FaqSourceDir = "__faq__" LegalSourceDir = "__legal__" LandingSourceDir = "__landing__" KBSourceDir = "__kb__" )
Source directory constants for special content types. These directories are processed separately from regular documentation pages.
const I18nSourceDir = "__translations__"
I18nSourceDir is the directory name for locale-specific translations
const VersionSourceDir = "__versions__"
VersionSourceDir is the directory name for version-specific content
Variables ¶
var DefaultConfigRegistry = map[string]func() any{ "site": func() any { return DefaultSiteConfig() }, "openapi": func() any { return DefaultOpenAPIConfig() }, "status": func() any { return DefaultStatusConfig() }, "uptime": func() any { return DefaultUptimeConfig() }, "changelog": func() any { return DefaultChangelogConfig() }, "stale_warning": func() any { return DefaultStaleWarningConfig() }, "landing": func() any { return DefaultLandingConfig() }, "theme": func() any { return DefaultThemeConfig() }, "portfolio": func() any { return DefaultPortfolioConfig() }, "contact": func() any { return DefaultContactConfig() }, "faq": func() any { return DefaultFaqConfig() }, "legal": func() any { return DefaultLegalConfig() }, "knowledgebase": func() any { return DefaultKBConfig() }, "waitlist": func() any { return DefaultWaitlistConfig() }, "roadmap": func() any { return DefaultRoadmapConfig() }, "footer": func() any { return DefaultFooterConfig() }, "link_check": func() any { return DefaultLinkCheckConfig() }, "versions": func() any { return DefaultVersionConfig() }, "i18n": func() any { return DefaultI18nConfig() }, "pdf_export": func() any { return DefaultPDFExportConfig() }, "claude_assist": func() any { return DefaultClaudeAssistConfig() }, "analytics": func() any { return DefaultAnalyticsConfig() }, }
DefaultConfigRegistry lists all default config functions for documentation and tooling purposes. Each entry maps a config name to its default function.
Functions ¶
func CollectFaqTags ¶
func CollectFaqTags(categories []FaqCategory) []string
CollectFaqTags returns all unique tags from FAQ items
func CollectKBTags ¶
CollectKBTags returns all unique tags from KB articles
func CollectProjectTags ¶
CollectProjectTags returns all unique tags from projects
func GenerateSlugFromPath ¶
GenerateSlugFromPath creates a URL-friendly slug from a file path Examples:
- "01-getting-started.md" -> "getting-started"
- "docs/02-api/index.md" -> "docs/api/index"
func GroupComponents ¶
func GroupComponents(components []StatusComponent) map[string][]StatusComponent
GroupComponents organizes components by their Group field
func GroupIncidentsByMonth ¶
GroupIncidentsByMonth groups incidents by their creation month
Types ¶
type APIEncoding ¶
type APIEncoding struct {
ContentType string // Content-Type for this field
Headers map[string]*APIParameter // Headers
Style string // Serialization style
Explode bool // Explode parameter
AllowReserved bool // Allow reserved characters
}
APIEncoding represents encoding for multipart/form-data
type APIEndpoint ¶
type APIEndpoint struct {
// Identity
OperationID string // Unique operation ID
Path string // URL path (e.g., /users/{id})
Method string // HTTP method (GET, POST, etc.)
// Documentation
Summary string // Short summary
Description string // Long description
Tags []string // Associated tags
Deprecated bool // Is deprecated
// Request
Parameters []*APIParameter // Path, query, header, cookie params
RequestBody *APIRequestBody // Request body
// Responses
Responses map[string]*APIResponse // Status code -> response
// Security
Security []map[string][]string // Security requirements
// Spec reference
SpecName string // Parent spec name
}
APIEndpoint represents a single API operation (path + method)
type APIExample ¶
type APIExample struct {
Summary string // Example summary
Description string // Example description
Value any // Example value
}
APIExample represents a named example
type APIMediaType ¶
type APIMediaType struct {
Schema *APISchema // Schema for this media type
Example any // Example value
Examples map[string]*APIExample // Named examples
Encoding map[string]*APIEncoding // Encoding for multipart
}
APIMediaType represents a media type (e.g., application/json)
type APIOAuthFlow ¶
type APIOAuthFlow struct {
AuthorizationURL string // Authorization URL
TokenURL string // Token URL
RefreshURL string // Refresh URL
Scopes map[string]string // Available scopes (scope -> description)
}
APIOAuthFlow represents a single OAuth flow
type APIOAuthFlows ¶
type APIOAuthFlows struct {
Implicit *APIOAuthFlow // Implicit flow
Password *APIOAuthFlow // Password flow
ClientCredentials *APIOAuthFlow // Client credentials flow
AuthorizationCode *APIOAuthFlow // Authorization code flow
}
APIOAuthFlows represents OAuth 2.0 flows
type APIParameter ¶
type APIParameter struct {
Name string // Parameter name
In string // Location: path, query, header, cookie
Description string // Parameter description
Required bool // Is required
Deprecated bool // Is deprecated
Schema *APISchema // Parameter schema
Example any // Example value
Examples map[string]*APIExample // Named examples
}
APIParameter represents a parameter (path, query, header, cookie)
type APIPathGroup ¶
type APIPathGroup struct {
Path string // Path segment (e.g., /users)
Endpoints []*APIEndpoint // Endpoints at this path
Children []*APIPathGroup // Sub-paths
}
APIPathGroup represents endpoints grouped by path hierarchy
func (*APIPathGroup) TotalEndpoints ¶
func (g *APIPathGroup) TotalEndpoints() int
TotalEndpoints returns the total count of endpoints including all children
type APIRequestBody ¶
type APIRequestBody struct {
Description string // Request body description
Required bool // Is required
Content map[string]*APIMediaType // Media type -> content
}
APIRequestBody represents a request body
type APIResponse ¶
type APIResponse struct {
Description string // Response description
Headers map[string]*APIParameter // Response headers
Content map[string]*APIMediaType // Media type -> content
}
APIResponse represents a response
type APISchema ¶
type APISchema struct {
Type string // Schema type (string, number, object, array, etc.)
Format string // Format (date-time, email, uuid, etc.)
Description string // Schema description
Properties map[string]*APISchema // Object properties
Items *APISchema // Array items schema
Required []string // Required properties
Enum []any // Enumeration values
Default any // Default value
Example any // Example value
Nullable bool // Can be null
ReadOnly bool // Read-only property
WriteOnly bool // Write-only property
Deprecated bool // Is deprecated
// Validation
Minimum *float64 // Minimum value
Maximum *float64 // Maximum value
MinLength *int // Minimum string length
MaxLength *int // Maximum string length
Pattern string // Regex pattern
MinItems *int // Minimum array items
MaxItems *int // Maximum array items
UniqueItems bool // Array items must be unique
MinProperties *int // Minimum object properties
MaxProperties *int // Maximum object properties
// Composition
AllOf []APISchema // All of these schemas
OneOf []APISchema // One of these schemas
AnyOf []APISchema // Any of these schemas
Not *APISchema // Not this schema
// Reference
Ref string // $ref value
}
APISchema represents a JSON schema
type APISecurityScheme ¶
type APISecurityScheme struct {
Type string // Type: apiKey, http, oauth2, openIdConnect
Description string // Description
Name string // Header/query/cookie name (for apiKey)
In string // Location: header, query, cookie (for apiKey)
Scheme string // Auth scheme: basic, bearer, etc. (for http)
BearerFormat string // Bearer token format (for http bearer)
Flows *APIOAuthFlows // OAuth flows (for oauth2)
OpenIDConnectURL string // OpenID Connect URL (for openIdConnect)
}
APISecurityScheme represents a security scheme
type APIServer ¶
type APIServer struct {
URL string // Server URL
Description string // Server description
Variables map[string]APIServerVariable // Server variables
}
APIServer represents an OpenAPI server definition
type APIServerVariable ¶
type APIServerVariable struct {
Default string // Default value
Description string // Variable description
Enum []string // Allowed values
}
APIServerVariable represents a server URL variable
type APISpec ¶
type APISpec struct {
// Metadata
Name string // Spec name (filename or derived from URL)
Title string // API title from spec info.title
Description string // API description from spec info.description
Version string // API version from spec info.version
FilePath string // Local file path (if from file)
URL string // Remote URL (if fetched)
LastFetched time.Time // Last fetch time for remote specs
ETag string // ETag for cache validation
LastModified string // Last-Modified header for cache validation
// Specification data
OpenAPIVersion string // OpenAPI version (3.0.x, 3.1.x)
Servers []APIServer // API servers
Endpoints []*APIEndpoint // All endpoints/operations
SecuritySchemes map[string]*APISecurityScheme // Security schemes defined in spec
Tags []APITag // Tags for organization
Schemas map[string]*APISchema // Reusable schemas from components
// Organization
OrganizedByPath []*APIPathGroup // Endpoints organized by path hierarchy
OrganizedByTag []*APITagGroup // Endpoints organized by tags
FlatEndpoints []*APIEndpoint // Flat list for search
// Output paths
OutputPath string // Generated HTML file path
}
APISpec represents a single OpenAPI/Swagger specification
type APISpecSource ¶
type APISpecSource struct {
Type string // "file" or "url"
Location string // File path or URL
CachePath string // Cache file path for URL sources
}
APISpecSource represents the source of an API spec
type APITagGroup ¶
type APITagGroup struct {
Tag APITag // Tag info
Endpoints []*APIEndpoint // Endpoints with this tag
}
APITagGroup represents endpoints grouped by tag
type AnalyticsConfig ¶
type AnalyticsConfig struct {
Enabled bool `yaml:"enabled"`
Providers []AnalyticsProvider `yaml:"providers"`
}
AnalyticsConfig holds configuration for the analytics system
func DefaultAnalyticsConfig ¶
func DefaultAnalyticsConfig() AnalyticsConfig
DefaultAnalyticsConfig returns an AnalyticsConfig with sensible defaults
func (AnalyticsConfig) GetEnabledProviders ¶
func (c AnalyticsConfig) GetEnabledProviders() []AnalyticsProvider
GetEnabledProviders returns only the enabled providers
func (AnalyticsConfig) GetMinimalDocProvider ¶
func (c AnalyticsConfig) GetMinimalDocProvider() *AnalyticsProvider
GetMinimalDocProvider returns the minimaldoc provider if enabled, nil otherwise
func (AnalyticsConfig) HasMinimalDocFeature ¶
func (c AnalyticsConfig) HasMinimalDocFeature(feature string) bool
HasMinimalDocFeature checks if minimaldoc provider has a specific feature enabled
func (AnalyticsConfig) ShouldShowFeedback ¶
func (c AnalyticsConfig) ShouldShowFeedback(pageType string) bool
ShouldShowFeedback checks if feedback widget should show on a page type
func (AnalyticsConfig) ShouldShowNewsletter ¶
func (c AnalyticsConfig) ShouldShowNewsletter(pageType string) bool
ShouldShowNewsletter checks if newsletter widget should show on a page type
type AnalyticsProvider ¶
type AnalyticsProvider struct {
Type string `yaml:"type"` // ga4, plausible, umami, matomo, fathom, simple, custom
Enabled bool `yaml:"enabled"`
Config map[string]any `yaml:"config"` // Provider-specific configuration
}
AnalyticsProvider represents a single analytics provider configuration
func (AnalyticsProvider) GetConfigMap ¶
func (p AnalyticsProvider) GetConfigMap(key string) map[string]string
GetConfigMap retrieves a map value from provider config (for attrs)
func (AnalyticsProvider) GetConfigSlice ¶
func (p AnalyticsProvider) GetConfigSlice(key string) []string
GetConfigSlice retrieves a slice value from provider config
func (AnalyticsProvider) GetConfigString ¶
func (p AnalyticsProvider) GetConfigString(key string) string
GetConfigString retrieves a string value from provider config
type BrokenLink ¶
type BrokenLink struct {
Link CollectedLink
Reason string
Suggestion string // Optional: "did you mean X?"
}
BrokenLink represents a link that failed validation
type CTASection ¶
type CTASection struct {
Title string `yaml:"title"`
Description string `yaml:"description"`
Buttons []HeroButton `yaml:"buttons"`
Background SectionBackground `yaml:"background"`
}
CTASection represents a call-to-action section
type ChangeCategory ¶
type ChangeCategory struct {
Type ChangeType
Entries []ChangeEntry
}
ChangeCategory represents a category of changes (Added, Changed, etc.)
type ChangeEntry ¶
type ChangeEntry struct {
Description string // the change description
RawMD string // raw markdown
HTML string // rendered HTML
}
ChangeEntry represents a single change within a category
type ChangeType ¶
type ChangeType string
ChangeType represents the type of change following Keep a Changelog format
const ( ChangeAdded ChangeType = "Added" ChangeChanged ChangeType = "Changed" ChangeDeprecated ChangeType = "Deprecated" ChangeRemoved ChangeType = "Removed" ChangeFixed ChangeType = "Fixed" ChangeSecurity ChangeType = "Security" )
func AllChangeTypes ¶
func AllChangeTypes() []ChangeType
AllChangeTypes returns all valid change types in standard order
func ParseChangeType ¶
func ParseChangeType(s string) (ChangeType, bool)
ParseChangeType converts a string to a ChangeType (case-insensitive)
func (ChangeType) Color ¶
func (c ChangeType) Color() string
Color returns the CSS color class for the change type
func (ChangeType) IsValid ¶
func (c ChangeType) IsValid() bool
IsValid checks if the change type is valid
func (ChangeType) Label ¶
func (c ChangeType) Label() string
Label returns a human-readable label for the change type
type ChangelogConfig ¶
type ChangelogConfig struct {
Enabled bool `yaml:"enabled"`
Title string `yaml:"title"`
Description string `yaml:"description"`
Path string `yaml:"path"` // output path (default: "changelog")
RSSEnabled bool `yaml:"rss_enabled"` // generate RSS feed
Repository string `yaml:"repository"` // GitHub repository URL for compare links
}
ChangelogConfig holds configuration for the changelog
func DefaultChangelogConfig ¶
func DefaultChangelogConfig() ChangelogConfig
DefaultChangelogConfig returns a ChangelogConfig with sensible defaults
type ChangelogPage ¶
type ChangelogPage struct {
Config ChangelogConfig
Releases []Release
LastUpdated time.Time
}
ChangelogPage represents the complete changelog data
type ClaudeAssistConfig ¶
type ClaudeAssistConfig struct {
Enabled bool `yaml:"enabled"` // Enable "Ask Claude" button
Prompt string `yaml:"prompt"` // Custom prompt prefix (optional)
Label string `yaml:"label"` // Button label (default: "Ask Claude")
}
ClaudeAssistConfig holds configuration for Claude AI assist feature
func DefaultClaudeAssistConfig ¶
func DefaultClaudeAssistConfig() ClaudeAssistConfig
DefaultClaudeAssistConfig returns a ClaudeAssistConfig with sensible defaults
type CollectedLink ¶
type CollectedLink struct {
URL string // The link URL
SourceFile string // Source markdown file path
Line int // Line number in source file
Column int // Column number
Text string // Link text (for context)
LinkType LinkType
}
CollectedLink represents a link found in a source file
type ComponentStatus ¶
type ComponentStatus string
ComponentStatus represents the operational status of a service component
const ( StatusOperational ComponentStatus = "operational" StatusDegraded ComponentStatus = "degraded" StatusPartialOutage ComponentStatus = "partial_outage" StatusMajorOutage ComponentStatus = "major_outage" StatusMaintenance ComponentStatus = "maintenance" )
func CalculateOverallStatus ¶
func CalculateOverallStatus(components []StatusComponent) ComponentStatus
CalculateOverallStatus determines the worst status among all components
func (ComponentStatus) IsValid ¶
func (c ComponentStatus) IsValid() bool
IsValid checks if the component status is valid
func (ComponentStatus) Severity ¶
func (c ComponentStatus) Severity() int
Severity returns a numeric severity for sorting (higher = worse)
type ContactConfig ¶
type ContactConfig struct {
Enabled bool `yaml:"enabled"`
Title string `yaml:"title"`
Description string `yaml:"description"`
Path string `yaml:"path"`
Email string `yaml:"email"`
Info []ContactInfo `yaml:"info"`
}
ContactConfig holds configuration for the contact page
func DefaultContactConfig ¶
func DefaultContactConfig() ContactConfig
DefaultContactConfig returns a ContactConfig with sensible defaults
type ContactInfo ¶
ContactInfo represents a contact information item
type ContactPage ¶
type ContactPage struct {
Config ContactConfig
}
ContactPage represents the complete contact page data
type FaqCategory ¶
type FaqCategory struct {
Name string `yaml:"name"`
Slug string `yaml:"-"`
Order int `yaml:"order"`
Items []FaqItem `yaml:"items"`
}
FaqCategory represents a category grouping of FAQ items
type FaqConfig ¶
type FaqConfig struct {
Enabled bool `yaml:"enabled"`
Title string `yaml:"title"`
Description string `yaml:"description"`
Path string `yaml:"path"`
Categories []FaqCategory `yaml:"categories"`
}
FaqConfig holds configuration for the FAQ page
func DefaultFaqConfig ¶
func DefaultFaqConfig() FaqConfig
DefaultFaqConfig returns a FaqConfig with sensible defaults
type FaqItem ¶
type FaqItem struct {
Question string `yaml:"question"`
Answer string `yaml:"answer"`
Slug string `yaml:"-"`
Order int `yaml:"order"`
Tags []string `yaml:"tags"`
// For markdown-based items
AnswerHTML string `yaml:"-"`
FilePath string `yaml:"-"`
Category string `yaml:"category"`
}
FaqItem represents a single FAQ question/answer pair
type FaqPage ¶
type FaqPage struct {
Config FaqConfig
Categories []FaqCategory
}
FaqPage represents the complete FAQ page data
type FeatureItem ¶
type FeatureItem struct {
Icon string `yaml:"icon"`
Emoji string `yaml:"emoji"`
Title string `yaml:"title"`
Description string `yaml:"description"`
}
FeatureItem represents a single feature in the grid
type FeaturesSection ¶
type FeaturesSection struct {
Title string `yaml:"title"`
Items []FeatureItem `yaml:"items"`
Background SectionBackground `yaml:"background"`
}
FeaturesSection represents the features grid section
type FooterConfig ¶
type FooterConfig struct {
}
FooterConfig holds configuration for the landing page footer
func DefaultFooterConfig ¶
func DefaultFooterConfig() FooterConfig
DefaultFooterConfig returns a FooterConfig with sensible defaults
type FooterLinkGroup ¶
type FooterLinkGroup struct {
}
FooterLinkGroup represents a group of footer links
type HTTPMethod ¶
type HTTPMethod string
HTTPMethod represents HTTP methods for API endpoints
const ( HTTPGet HTTPMethod = "GET" HTTPPost HTTPMethod = "POST" HTTPPut HTTPMethod = "PUT" HTTPPatch HTTPMethod = "PATCH" HTTPDelete HTTPMethod = "DELETE" HTTPHead HTTPMethod = "HEAD" HTTPOptions HTTPMethod = "OPTIONS" HTTPTrace HTTPMethod = "TRACE" )
func AllHTTPMethods ¶
func AllHTTPMethods() []HTTPMethod
AllHTTPMethods returns all valid HTTP methods in standard order
func (HTTPMethod) IsValid ¶
func (m HTTPMethod) IsValid() bool
IsValid checks if the HTTP method is valid
type HeroButton ¶
type HeroButton struct {
Text string `yaml:"text"`
URL string `yaml:"url"`
Primary bool `yaml:"primary"`
}
HeroButton represents a CTA button in the hero section
type HeroSection ¶
type HeroSection struct {
Title string `yaml:"title"`
Subtitle string `yaml:"subtitle"`
Buttons []HeroButton `yaml:"buttons"`
Image string `yaml:"image"`
Background SectionBackground `yaml:"background"`
}
HeroSection represents the hero/header section of landing page
type I18nConfig ¶
type I18nConfig struct {
Enabled bool `yaml:"enabled"`
DefaultLocale string `yaml:"default_locale"` // Default locale code (e.g., "en")
Locales []LocaleInfo `yaml:"locales"` // Available locales
Fallback string `yaml:"fallback"` // Fallback locale for missing translations
HideDefaultLocale bool `yaml:"hide_default_locale"` // Use /page.html instead of /en/page.html for default
ShowUntranslated bool `yaml:"show_untranslated"` // Show fallback content with warning badge
Selector LocaleSelector `yaml:"selector"` // UI selector configuration
}
I18nConfig holds the configuration for internationalization
func DefaultI18nConfig ¶
func DefaultI18nConfig() I18nConfig
DefaultI18nConfig returns an I18nConfig with sensible defaults
func (*I18nConfig) GetDefaultLocale ¶
func (c *I18nConfig) GetDefaultLocale() *LocaleInfo
GetDefaultLocale returns the default LocaleInfo
func (*I18nConfig) GetFallbackLocale ¶
func (c *I18nConfig) GetFallbackLocale() *LocaleInfo
GetFallbackLocale returns the fallback LocaleInfo
func (*I18nConfig) GetLocale ¶
func (c *I18nConfig) GetLocale(code string) *LocaleInfo
GetLocale returns the LocaleInfo for a given locale code
type ImageTextItem ¶
type ImageTextItem struct {
Icon string `yaml:"icon"`
Title string `yaml:"title"`
Description string `yaml:"description"`
}
ImageTextItem represents a bullet point in an image-text section
type ImageTextSection ¶
type ImageTextSection struct {
ID string `yaml:"id"` // Section ID for ordering
Title string `yaml:"title"`
Description string `yaml:"description"`
Content string `yaml:"content"` // Markdown content
Image string `yaml:"image"` // Image URL
ImageAlt string `yaml:"image_alt"` // Image alt text
ImagePosition string `yaml:"image_position"` // left or right (default: right)
Items []ImageTextItem `yaml:"items"` // Optional bullet points
Buttons []HeroButton `yaml:"buttons"` // Optional CTA buttons
Background SectionBackground `yaml:"background"`
Order int `yaml:"order"` // Display order
}
ImageTextSection represents an image + content side-by-side section
type Incident ¶
type Incident struct {
// Identity
ID string `yaml:"id"` // derived from filename if not set
Slug string `yaml:"-"` // URL-friendly identifier
FilePath string `yaml:"-"` // source file path
// Metadata from frontmatter
Title string `yaml:"title"`
Status IncidentStatus `yaml:"status"`
Severity IncidentSeverity `yaml:"severity"`
AffectedComponents []string `yaml:"affected_components"`
CreatedAt time.Time `yaml:"created_at"`
UpdatedAt time.Time `yaml:"updated_at"`
ResolvedAt *time.Time `yaml:"resolved_at"`
// Content
Updates []IncidentUpdate `yaml:"-"` // parsed from markdown content
RawMD string `yaml:"-"` // raw markdown content
HTML string `yaml:"-"` // rendered HTML
// Output
OutputPath string `yaml:"-"` // generated HTML path
}
Incident represents a service incident or outage
func FilterActiveIncidents ¶
FilterActiveIncidents returns only active (unresolved) incidents
func FilterResolvedIncidents ¶
FilterResolvedIncidents returns only resolved incidents
type IncidentSeverity ¶
type IncidentSeverity string
IncidentSeverity represents the severity level of an incident
const ( SeverityMinor IncidentSeverity = "minor" SeverityMajor IncidentSeverity = "major" SeverityCritical IncidentSeverity = "critical" )
func (IncidentSeverity) IsValid ¶
func (s IncidentSeverity) IsValid() bool
IsValid checks if the incident severity is valid
func (IncidentSeverity) Level ¶
func (s IncidentSeverity) Level() int
Level returns a numeric severity for sorting (higher = worse)
type IncidentStatus ¶
type IncidentStatus string
IncidentStatus represents the status of an incident
const ( IncidentInvestigating IncidentStatus = "investigating" IncidentIdentified IncidentStatus = "identified" IncidentMonitoring IncidentStatus = "monitoring" IncidentResolved IncidentStatus = "resolved" )
func (IncidentStatus) IsActive ¶
func (i IncidentStatus) IsActive() bool
IsActive returns true if the incident is not yet resolved
func (IncidentStatus) IsValid ¶
func (i IncidentStatus) IsValid() bool
IsValid checks if the incident status is valid
type IncidentUpdate ¶
type IncidentUpdate struct {
Timestamp time.Time `yaml:"timestamp"`
Status IncidentStatus `yaml:"status"`
Message string `yaml:"message"` // rendered HTML
RawMD string `yaml:"-"` // raw markdown
}
IncidentUpdate represents a status update within an incident
type KBArticle ¶
type KBArticle struct {
// Identity
Slug string `yaml:"-"`
FilePath string `yaml:"-"`
// Metadata from frontmatter
Title string `yaml:"title"`
Description string `yaml:"description"`
Tags []string `yaml:"tags"`
Order int `yaml:"order"`
// Category
CategorySlug string `yaml:"-"`
CategoryName string `yaml:"-"`
// Content
RawMD string `yaml:"-"`
HTML string `yaml:"-"`
// Navigation
Prev *KBArticle `yaml:"-"`
Next *KBArticle `yaml:"-"`
// Related
RelatedArticles []KBArticle `yaml:"-"`
// Output
OutputPath string `yaml:"-"`
}
KBArticle represents a single article in the Knowledge Base
type KBCategory ¶
type KBCategory struct {
// Identity
Slug string `yaml:"-"`
// Display
Name string `yaml:"name"`
Description string `yaml:"description"`
Icon string `yaml:"icon"`
Order int `yaml:"order"`
// Content
Articles []KBArticle `yaml:"-"`
ArticleCount int `yaml:"-"`
// Output
OutputPath string `yaml:"-"`
}
KBCategory represents a category in the Knowledge Base
type KBCategoryDef ¶
type KBCategoryDef struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
Icon string `yaml:"icon"`
Order int `yaml:"order"`
}
KBCategoryDef holds category definition overrides from config
type KBConfig ¶
type KBConfig struct {
Enabled bool `yaml:"enabled"`
Title string `yaml:"title"`
Description string `yaml:"description"`
Path string `yaml:"path"`
Search KBSearchConfig `yaml:"search"`
Categories map[string]KBCategoryDef `yaml:"categories"` // Override category display names
}
KBConfig holds configuration for the Knowledge Base
func DefaultKBConfig ¶
func DefaultKBConfig() KBConfig
DefaultKBConfig returns a KBConfig with sensible defaults
type KBPage ¶
type KBPage struct {
Config KBConfig
Categories []KBCategory
Articles []KBArticle // All articles (flat list for search)
TotalArticles int
}
KBPage represents the complete Knowledge Base page data
type KBSearchConfig ¶
type KBSearchConfig struct {
Enabled bool `yaml:"enabled"`
Placeholder string `yaml:"placeholder"`
}
KBSearchConfig holds search configuration for the Knowledge Base
type LandingConfig ¶
type LandingConfig struct {
Enabled bool `yaml:"enabled"`
Hero HeroSection `yaml:"hero"`
Features FeaturesSection `yaml:"features"`
Steps StepsSection `yaml:"steps"`
CTA CTASection `yaml:"cta"`
Testimonials TestimonialsSection `yaml:"testimonials"`
OpenSource OpenSourceSection `yaml:"opensource"`
Links LinksSection `yaml:"links"`
ImageText []ImageTextSection `yaml:"image_text"`
TextBlocks []TextSection `yaml:"text_blocks"`
LinksGrid []LinksGridSection `yaml:"links_grid"`
}
LandingConfig holds configuration for the landing page
func DefaultLandingConfig ¶
func DefaultLandingConfig() LandingConfig
DefaultLandingConfig returns a LandingConfig with sensible defaults
type LandingNavLink ¶
type LandingNavLink struct {
}
LandingNavLink represents a navigation link in the landing header
type LandingPage ¶
type LandingPage struct {
Config LandingConfig
Hero *HeroSection
Features *FeaturesSection
Steps *StepsSection
CTA *CTASection
Testimonials *TestimonialsSection
OpenSource *OpenSourceSection
Links *LinksSection
ImageText []*ImageTextSection
TextBlocks []*TextSection
LinksGrid []*LinksGridSection
}
LandingPage represents the complete landing page data
type LegalConfig ¶
LegalConfig holds configuration for legal pages
func DefaultLegalConfig ¶
func DefaultLegalConfig() LegalConfig
DefaultLegalConfig returns a LegalConfig with sensible defaults
type LegalPage ¶
type LegalPage struct {
// Identity
Slug string `yaml:"-"`
FilePath string `yaml:"-"`
// Metadata from frontmatter
Title string `yaml:"title"`
Description string `yaml:"description"`
Order int `yaml:"order"`
// Content
RawMD string `yaml:"-"`
HTML string `yaml:"-"`
// Output
OutputPath string `yaml:"-"`
}
LegalPage represents a single legal page (privacy, terms, etc.)
type LinkCheckConfig ¶
type LinkCheckConfig struct {
Enabled bool `yaml:"enabled"`
Mode LinkCheckMode `yaml:"mode"`
CheckExternal bool `yaml:"check_external"`
ExternalTimeout int `yaml:"external_timeout"` // Seconds
IgnorePatterns []string `yaml:"ignore_patterns"` // Glob patterns to skip
AllowedBroken []string `yaml:"allowed_broken"` // Known broken links to ignore
}
LinkCheckConfig holds configuration for the link checker
func DefaultLinkCheckConfig ¶
func DefaultLinkCheckConfig() LinkCheckConfig
DefaultLinkCheckConfig returns a LinkCheckConfig with sensible defaults
type LinkCheckMode ¶
type LinkCheckMode string
LinkCheckMode represents how link check errors are handled
const ( LinkCheckError LinkCheckMode = "error" // Fail build on broken links LinkCheckWarn LinkCheckMode = "warn" // Warn but continue build LinkCheckIgnore LinkCheckMode = "ignore" // Skip link checking )
type LinkCheckResult ¶
type LinkCheckResult struct {
TotalLinks int
BrokenLinks []BrokenLink
SkippedLinks int // Links that matched ignore patterns
ExternalLinks int // External links (checked or not)
}
LinkCheckResult holds the results of link checking
func (*LinkCheckResult) BrokenCount ¶
func (r *LinkCheckResult) BrokenCount() int
BrokenCount returns the number of broken links
func (*LinkCheckResult) HasErrors ¶
func (r *LinkCheckResult) HasErrors() bool
HasErrors returns true if there are broken links
type LinkItem ¶
type LinkItem struct {
Icon string `yaml:"icon"`
Title string `yaml:"title"`
Description string `yaml:"description"`
URL string `yaml:"url"`
}
LinkItem represents a single link card
type LinkType ¶
type LinkType int
LinkType categorizes links for validation
const ( LinkTypeInternalPage LinkType = iota // /page.html, ./page.md LinkTypeInternalAnchor // #section LinkTypeInternalAsset // /images/logo.png LinkTypeExternal // https://example.com LinkTypeEmail // mailto:user@example.com LinkTypeOther // tel:, javascript:, etc. )
type LinksGridItem ¶
type LinksGridItem struct {
Icon string `yaml:"icon"` // Icon identifier or emoji
Title string `yaml:"title"`
Description string `yaml:"description"`
URL string `yaml:"url"`
External bool `yaml:"external"` // Opens in new tab (default: true for http/https)
}
LinksGridItem represents a single card in the links grid
type LinksGridSection ¶
type LinksGridSection struct {
ID string `yaml:"id"` // Section ID for ordering
Title string `yaml:"title"`
Description string `yaml:"description"`
Columns int `yaml:"columns"` // Number of columns (default: 4)
Items []LinksGridItem `yaml:"items"`
Background SectionBackground `yaml:"background"`
Order int `yaml:"order"` // Display order
}
LinksGridSection represents a grid of external link cards
type LinksSection ¶
type LinksSection struct {
Title string `yaml:"title"`
Description string `yaml:"description"`
Items []LinkItem `yaml:"items"`
}
LinksSection represents a grid of resource links
type LocaleInfo ¶
type LocaleInfo struct {
Code string `yaml:"code"` // Locale code (e.g., "en", "fr", "de")
Name string `yaml:"name"` // Display name (e.g., "English", "Francais")
Direction string `yaml:"direction"` // Text direction: "ltr" or "rtl"
Flag string `yaml:"flag"` // Optional flag emoji or icon
}
LocaleInfo represents a single locale
func (*LocaleInfo) GetDirection ¶
func (l *LocaleInfo) GetDirection() string
GetDirection returns the text direction, defaulting to "ltr"
func (*LocaleInfo) IsRTL ¶
func (l *LocaleInfo) IsRTL() bool
IsRTL returns true if the locale uses right-to-left text direction
type LocaleSelector ¶
type LocaleSelector struct {
Position string `yaml:"position"` // "header" or "sidebar"
ShowFlags bool `yaml:"show_flags"` // Show flag icons/emojis
}
LocaleSelector configures the locale selector UI
type LocalizedSite ¶
type LocalizedSite struct {
Locale LocaleInfo // Current locale being built
Pages []*Page // Pages for this locale
OutputRoot string // Output directory for this locale
}
LocalizedSite represents a site built for a specific locale
type MCPConfig ¶ added in v1.5.0
type MCPConfig struct {
Enabled bool `yaml:"enabled"`
SpecFiles []string `yaml:"spec_files"` // JSON manifest file paths/globs relative to docs root
Path string `yaml:"path"` // Output URL path (default: "mcp")
}
MCPConfig holds MCP server documentation configuration
func DefaultMCPConfig ¶ added in v1.5.0
func DefaultMCPConfig() MCPConfig
DefaultMCPConfig returns an MCPConfig with sensible defaults
type MCPPrompt ¶ added in v1.5.0
type MCPPrompt struct {
Name string
Description string
Arguments []*MCPPromptArgument
}
MCPPrompt represents a single MCP prompt
type MCPPromptArgument ¶ added in v1.5.0
MCPPromptArgument represents a single prompt argument
type MCPResource ¶ added in v1.5.0
MCPResource represents a single MCP resource
type MCPSchema ¶ added in v1.5.0
type MCPSchema struct {
Type string
Description string
Properties map[string]*MCPSchema
Required []string
Enum []any
Items *MCPSchema // for array types
}
MCPSchema represents a JSON Schema for tool input parameters
type MCPSpec ¶ added in v1.5.0
type MCPSpec struct {
Name string
Description string
Slug string
Tools []*MCPTool
Resources []*MCPResource
Prompts []*MCPPrompt
OutputPath string
}
MCPSpec represents a parsed MCP server manifest
type MCPToolGroup ¶ added in v1.5.0
MCPToolGroup is a named group of tools used for rendering grouped sections
type Maintenance ¶
type Maintenance struct {
// Identity
ID string `yaml:"id"`
Slug string `yaml:"-"`
FilePath string `yaml:"-"`
// Metadata
Title string `yaml:"title"`
Description string `yaml:"description"`
AffectedComponents []string `yaml:"affected_components"`
ScheduledStart time.Time `yaml:"scheduled_start"`
ScheduledEnd time.Time `yaml:"scheduled_end"`
Status MaintenanceStatus `yaml:"status"`
// Content
RawMD string `yaml:"-"`
HTML string `yaml:"-"`
// Output
OutputPath string `yaml:"-"`
}
Maintenance represents scheduled maintenance
func FilterActiveMaintenance ¶
func FilterActiveMaintenance(maintenance []Maintenance) []Maintenance
FilterActiveMaintenance returns maintenance currently in progress
func FilterUpcomingMaintenance ¶
func FilterUpcomingMaintenance(maintenance []Maintenance) []Maintenance
FilterUpcomingMaintenance returns scheduled maintenance that hasn't started
func (*Maintenance) Duration ¶
func (m *Maintenance) Duration() time.Duration
Duration returns the planned duration of the maintenance
func (*Maintenance) IsActive ¶
func (m *Maintenance) IsActive() bool
IsActive returns true if maintenance is currently in progress
func (*Maintenance) IsUpcoming ¶
func (m *Maintenance) IsUpcoming() bool
IsUpcoming returns true if maintenance is scheduled but not started
type MaintenanceStatus ¶
type MaintenanceStatus string
MaintenanceStatus represents the status of scheduled maintenance
const ( MaintenanceScheduled MaintenanceStatus = "scheduled" MaintenanceInProgress MaintenanceStatus = "in_progress" MaintenanceCompleted MaintenanceStatus = "completed" )
func (MaintenanceStatus) IsValid ¶
func (m MaintenanceStatus) IsValid() bool
IsValid checks if the maintenance status is valid
type Metadata ¶
type Metadata struct {
// Basic metadata
Title string `yaml:"title"`
Description string `yaml:"description"`
Tags []string `yaml:"tags"`
Author string `yaml:"author"`
Date string `yaml:"date"`
// Menu/Navigation overrides
MenuTitle string `yaml:"menu_title"` // Override display name in navigation
MenuOrder int `yaml:"menu_order"` // Override order (takes precedence over file numbering)
Hidden bool `yaml:"hidden"` // Hide from navigation
// Layout overrides
FullWidth bool `yaml:"full_width"` // Hide sidebar, use full-width layout
NoHeader bool `yaml:"no_header"` // Hide page header (title, buttons, description)
NoWidgets bool `yaml:"no_widgets"` // Hide feedback and newsletter widgets
// SEO metadata
SEO SEO `yaml:"seo"`
// OpenAPI integration
OpenAPISpec string `yaml:"openapi_spec"` // Reference to OpenAPI spec file/URL
OpenAPIPath string `yaml:"openapi_path"` // Specific endpoint path to embed
OpenAPIMethod string `yaml:"openapi_method"` // Specific HTTP method to embed
// Stale warning overrides
StaleWarning *bool `yaml:"stale_warning"` // Override site setting (nil = use site default)
StaleThresholdDays *int `yaml:"stale_threshold_days"` // Override threshold (nil = use site default)
// Portfolio-specific fields
Image string `yaml:"image"` // Project image
Links []MetadataLink `yaml:"links"` // Project links
Featured bool `yaml:"featured"` // Featured project
// FAQ-specific fields
Question string `yaml:"question"` // FAQ question text
Category string `yaml:"category"` // FAQ category name
// Version-specific fields
Versions []string `yaml:"versions"` // Versions this page appears in (empty = all)
Since string `yaml:"since"` // Version this feature was introduced
DeprecatedIn string `yaml:"deprecated_in"` // Version where feature was deprecated
RemovedIn string `yaml:"removed_in"` // Version where feature was removed
VersionNote string `yaml:"version_note"` // Version to show note for
// Custom fields (for extensibility)
Custom map[string]any `yaml:"custom"`
}
Metadata represents the frontmatter data from a markdown file
func DefaultMetadata ¶
func DefaultMetadata() Metadata
DefaultMetadata returns a Metadata instance with sensible defaults
type MetadataLink ¶
MetadataLink represents a link in metadata
type OpenAPIConfig ¶
type OpenAPIConfig struct {
Enabled bool // Enable OpenAPI support
SpecFiles []string // Local spec file paths/globs
SpecURLs []string // Remote spec URLs to fetch
DefaultView string // Default organization view: "path", "tag", "flat"
SyncOnBuild bool // Sync remote specs on every build
CacheDir string // Cache directory for remote specs
EnableTesting bool // Enable API testing UI
EnableExport bool // Enable export to restcli/curl
EnableCodeSamples bool // Enable code samples (curl, fetch, Go, Python)
LazyLoadChunkSize int // Chunk size for lazy loading (bytes)
}
OpenAPIConfig holds OpenAPI-specific configuration
func DefaultOpenAPIConfig ¶
func DefaultOpenAPIConfig() OpenAPIConfig
DefaultOpenAPIConfig returns an OpenAPIConfig with sensible defaults
type OpenSourceSection ¶
type OpenSourceSection struct {
Title string `yaml:"title"`
Description string `yaml:"description"`
Links []SimpleLink `yaml:"links"`
Background SectionBackground `yaml:"background"`
}
OpenSourceSection represents the open source/credits section
type PDFExportConfig ¶
type PDFExportConfig struct {
Enabled bool `yaml:"enabled"` // Enable PDF export button
PageBreakLevel int `yaml:"page_break_level"` // Heading level for page breaks (1=h1, 2=h1+h2, 0=none)
}
PDFExportConfig holds configuration for PDF export feature
func DefaultPDFExportConfig ¶
func DefaultPDFExportConfig() PDFExportConfig
DefaultPDFExportConfig returns a PDFExportConfig with sensible defaults
type Page ¶
type Page struct {
// File information
SourcePath string // Original markdown file path
RelPath string // Relative path from docs root
Slug string // URL-friendly slug (e.g., "getting-started")
OutputPath string // Output HTML file path
ModTime time.Time // File modification time
// Content
Metadata Metadata // Parsed frontmatter
RawMD []byte // Raw markdown content (without frontmatter)
HTML []byte // Rendered HTML content
// Navigation
Order int // Computed order (from filename prefix or metadata)
Parent *Page // Parent page (for nested navigation)
Children []*Page // Child pages
Next *Page // Next page in sequence
Prev *Page // Previous page in sequence
// Table of Contents
TOC *TOC // Parsed table of contents from headings
// Stale content warning (computed at build time)
IsStale bool // True if content is older than threshold
StaleAge string // Human-readable age: "2 years", "18 months"
DaysSinceUpdate int // Exact days since last update
}
Page represents a single documentation page
type ParameterLocation ¶
type ParameterLocation string
ParameterLocation represents where a parameter is located in an API request
const ( ParamInPath ParameterLocation = "path" ParamInQuery ParameterLocation = "query" ParamInHeader ParameterLocation = "header" ParamInCookie ParameterLocation = "cookie" )
func (ParameterLocation) IsValid ¶
func (p ParameterLocation) IsValid() bool
IsValid checks if the parameter location is valid
type PortfolioConfig ¶
type PortfolioConfig struct {
Enabled bool `yaml:"enabled"`
Title string `yaml:"title"`
Description string `yaml:"description"`
Path string `yaml:"path"`
}
PortfolioConfig holds configuration for the portfolio page
func DefaultPortfolioConfig ¶
func DefaultPortfolioConfig() PortfolioConfig
DefaultPortfolioConfig returns a PortfolioConfig with sensible defaults
type PortfolioPage ¶
type PortfolioPage struct {
Config PortfolioConfig
Projects []Project
FeaturedProjects []Project
Tags []string // All unique tags for filtering
}
PortfolioPage represents the complete portfolio page data
type Project ¶
type Project struct {
// Identity
ID string `yaml:"-"`
Slug string `yaml:"-"`
FilePath string `yaml:"-"`
// Metadata from frontmatter
Title string `yaml:"title"`
Description string `yaml:"description"`
Image string `yaml:"image"`
Tags []string `yaml:"tags"`
Links []SimpleLink `yaml:"links"`
Date time.Time `yaml:"date"`
Featured bool `yaml:"featured"`
Order int `yaml:"order"`
// Content
RawMD string `yaml:"-"`
HTML string `yaml:"-"`
// Output
OutputPath string `yaml:"-"`
}
Project represents a portfolio project
func FilterFeaturedProjects ¶
FilterFeaturedProjects returns only featured projects
type Release ¶
type Release struct {
// Identity
Version string `yaml:"version"`
Slug string `yaml:"-"` // URL-friendly version (e.g., "1.2.0")
// Metadata from frontmatter
Date time.Time `yaml:"date"`
Title string `yaml:"title"` // optional title for the release
Prerelease bool `yaml:"prerelease"` // is this a prerelease version
// Semantic version components (for sorting)
Major int `yaml:"-"`
Minor int `yaml:"-"`
Patch int `yaml:"-"`
// Content
Categories []ChangeCategory `yaml:"-"` // changes grouped by category
RawMD string `yaml:"-"` // raw markdown content
HTML string `yaml:"-"` // rendered HTML
// Generated
CompareURL string `yaml:"-"` // GitHub compare link to previous version
OutputPath string `yaml:"-"` // generated HTML path
}
Release represents a single version release
type RoadmapColumn ¶
RoadmapColumn represents a column in the board layout
type RoadmapConfig ¶
type RoadmapConfig struct {
Enabled bool `yaml:"enabled"`
Title string `yaml:"title"`
Description string `yaml:"description"`
Layout string `yaml:"layout"` // "board" or "timeline"
ShowVersions bool `yaml:"show_versions"`
Path string `yaml:"path"`
Columns []RoadmapColumn `yaml:"columns"`
Items []RoadmapItem `yaml:"items"`
}
RoadmapConfig holds configuration for the roadmap page
func DefaultRoadmapConfig ¶
func DefaultRoadmapConfig() RoadmapConfig
DefaultRoadmapConfig returns a RoadmapConfig with sensible defaults
type RoadmapItem ¶
type RoadmapItem struct {
Title string `yaml:"title"`
Description string `yaml:"description"`
Status string `yaml:"status"`
Version string `yaml:"version"`
Tags []string `yaml:"tags"`
ShippedDate string `yaml:"shipped_date"`
ChangelogURL string `yaml:"changelog_url"`
}
RoadmapItem represents a single roadmap entry
type RoadmapPage ¶
type RoadmapPage struct {
Config RoadmapConfig
}
RoadmapPage represents the roadmap page data passed to the template
type SEO ¶
type SEO struct {
Title string `yaml:"title"` // SEO title (og:title)
Description string `yaml:"description"` // SEO description (og:description)
Keywords []string `yaml:"keywords"` // Meta keywords
Image string `yaml:"image"` // og:image
Author string `yaml:"author"` // Author
Canonical string `yaml:"canonical"` // Canonical URL
NoIndex bool `yaml:"noindex"` // Don't index this page
NoFollow bool `yaml:"nofollow"` // Don't follow links on this page
}
SEO represents SEO-specific metadata
type SLAStats ¶
type SLAStats struct {
Target float64 `json:"target"` // target SLA (e.g., 99.9)
Current7d float64 `json:"current_7d"` // uptime % over last 7 days
Current30d float64 `json:"current_30d"` // uptime % over last 30 days
Current90d float64 `json:"current_90d"` // uptime % over last 90 days
}
SLAStats holds calculated SLA statistics
type SchemaType ¶
type SchemaType string
SchemaType represents JSON schema types
const ( SchemaString SchemaType = "string" SchemaNumber SchemaType = "number" SchemaInteger SchemaType = "integer" SchemaBoolean SchemaType = "boolean" SchemaArray SchemaType = "array" SchemaObject SchemaType = "object" SchemaNull SchemaType = "null" )
func (SchemaType) IsValid ¶
func (s SchemaType) IsValid() bool
IsValid checks if the schema type is valid
type SectionBackground ¶
type SectionBackground struct {
Image string `yaml:"image"` // Background image URL
Overlay string `yaml:"overlay"` // Overlay color (e.g., "rgba(0,0,0,0.6)")
Color string `yaml:"color"` // Background color
Position string `yaml:"position"` // Background position (default: "center")
Size string `yaml:"size"` // Background size (default: "cover")
Attachment string `yaml:"attachment"` // Background attachment (scroll/fixed)
}
SectionBackground holds background styling for any section
func (*SectionBackground) HasBackground ¶
func (s *SectionBackground) HasBackground() bool
HasBackground returns true if any background is configured
type SecuritySchemeType ¶
type SecuritySchemeType string
SecuritySchemeType represents the type of security scheme
const ( SecurityAPIKey SecuritySchemeType = "apiKey" SecurityHTTP SecuritySchemeType = "http" SecurityOAuth2 SecuritySchemeType = "oauth2" SecurityOpenIDConnect SecuritySchemeType = "openIdConnect" )
func (SecuritySchemeType) IsValid ¶
func (s SecuritySchemeType) IsValid() bool
IsValid checks if the security scheme type is valid
type SimpleLink ¶
SimpleLink represents a simple text/url link
type Site ¶
type Site struct {
// Configuration
Config SiteConfig
// Content
Pages []*Page // All pages
RootPages []*Page // Top-level pages (for navigation)
APISpecs []*APISpec // OpenAPI specifications
StatusPage *StatusPage // Status page data (if enabled)
ChangelogPage *ChangelogPage // Changelog data (if enabled)
LandingPage *LandingPage // Landing page data (if enabled)
PortfolioPage *PortfolioPage // Portfolio page data (if enabled)
ContactPage *ContactPage // Contact page data (if enabled)
FaqPage *FaqPage // FAQ page data (if enabled)
LegalPages []*LegalPage // Legal pages (if enabled)
KBPage *KBPage // Knowledge Base data (if enabled)
WaitlistPage *WaitlistPage // Waitlist page data (if enabled)
RoadmapPage *RoadmapPage // Roadmap page data (if enabled)
MCPSpecs []*MCPSpec // MCP server documentation (if enabled)
// Versioning
VersionedPages map[string][]*Page // Pages per version (key = version name)
CurrentVersion string // Current version being built (empty = default)
// Internationalization
LocalizedPages map[string][]*Page // Pages per locale (key = locale code)
CurrentLocale string // Current locale being built (empty = default)
// Paths
DocsRoot string // Root directory of markdown files
OutputRoot string // Output directory for generated site
}
Site represents the entire documentation site
func NewSite ¶
func NewSite(docsRoot, outputRoot string, config SiteConfig) *Site
NewSite creates a new Site instance
type SiteConfig ¶
type SiteConfig struct {
// Basic info
Title string `yaml:"title"`
Description string `yaml:"description"`
BaseURL string `yaml:"base_url"`
Author string `yaml:"author"`
// Theme
Theme string `yaml:"theme"` // Theme name (default: "default")
DarkMode bool `yaml:"dark_mode"` // Enable dark mode by default
ThemeConfig ThemeConfig `yaml:"theme_config"` // Custom theme configuration
// Features
EnableLLMS bool `yaml:"enable_llms"` // Generate llms.txt
EnableSearch bool `yaml:"enable_search"` // Enable search (future)
// Entrypoint
Entrypoint string `yaml:"entrypoint"` // Custom homepage file (default: index.md)
SingleFileMode bool `yaml:"-"` // Only process the entrypoint file
NavDepth int `yaml:"nav_depth"` // Max depth for navigation tree (0 = unlimited)
// Output
CleanURLs bool `yaml:"clean_urls"` // Use /page/ instead of /page.html
// OpenAPI
OpenAPI OpenAPIConfig `yaml:"openapi"` // OpenAPI/Swagger configuration
// Status
Status StatusConfig `yaml:"status"` // Status page configuration
// Changelog
Changelog ChangelogConfig `yaml:"changelog"` // Changelog configuration
// Stale Warning
StaleWarning StaleWarningConfig `yaml:"stale_warning"` // Stale content warning configuration
// Landing Page
Landing LandingConfig `yaml:"landing"` // Landing page configuration
// Portfolio
Portfolio PortfolioConfig `yaml:"portfolio"` // Portfolio page configuration
// Contact
Contact ContactConfig `yaml:"contact"` // Contact page configuration
// FAQ
Faq FaqConfig `yaml:"faq"` // FAQ page configuration
// Legal
Legal LegalConfig `yaml:"legal"` // Legal pages configuration
// Knowledge Base
KnowledgeBase KBConfig `yaml:"knowledgebase"` // Knowledge Base configuration
// Waitlist
Waitlist WaitlistConfig `yaml:"waitlist"` // Waitlist landing page configuration
// Roadmap
Roadmap RoadmapConfig `yaml:"roadmap"` // Roadmap page configuration
Footer FooterConfig `yaml:"footer"` // Footer configuration
// Social Links
SocialLinks []SocialLink `yaml:"social_links"` // Social media links in sidebar
// Link Check
LinkCheck LinkCheckConfig `yaml:"link_check"` // Link checker configuration
// Versions
Versions VersionConfig `yaml:"versions"` // Multi-version documentation configuration
// Internationalization
I18n I18nConfig `yaml:"i18n"` // Internationalization configuration
// PDF Export
PDFExport PDFExportConfig `yaml:"pdf_export"` // PDF export configuration
// Claude Assist
ClaudeAssist ClaudeAssistConfig `yaml:"claude_assist"` // Claude AI assist configuration
// Analytics
Analytics AnalyticsConfig `yaml:"analytics"` // Analytics providers configuration
// MCP Server Documentation
MCP MCPConfig `yaml:"mcp"` // MCP server documentation configuration
// Custom
Custom map[string]any `yaml:"custom"`
}
SiteConfig holds the site-wide configuration
func DefaultConfigs ¶
func DefaultConfigs() SiteConfig
DefaultConfigs returns a fully initialized SiteConfig with all defaults applied. This is the single source of truth for default configuration values.
func DefaultSiteConfig ¶
func DefaultSiteConfig() SiteConfig
DefaultSiteConfig returns a SiteConfig with sensible defaults
type SocialLink ¶
type SocialLink struct {
Name string `yaml:"name"` // Display name (e.g., "GitHub", "Twitter")
URL string `yaml:"url"` // Link URL
Icon string `yaml:"icon"` // Icon identifier (github, twitter, linkedin, etc.)
}
SocialLink represents a social media or external link
type StaleWarningConfig ¶
type StaleWarningConfig struct {
Enabled bool `yaml:"enabled"`
ThresholdDays int `yaml:"threshold_days"` // Days before content is considered stale
Message string `yaml:"message"` // Custom message (optional)
ShowUpdateDate bool `yaml:"show_update_date"` // Show the actual last update date
}
StaleWarningConfig holds configuration for stale content warnings
func DefaultStaleWarningConfig ¶
func DefaultStaleWarningConfig() StaleWarningConfig
DefaultStaleWarningConfig returns a StaleWarningConfig with sensible defaults
type StatusComponent ¶
type StatusComponent struct {
ID string `yaml:"id"`
Name string `yaml:"name"`
Description string `yaml:"description"`
Status ComponentStatus `yaml:"status"`
Group string `yaml:"group"` // optional grouping
Order int `yaml:"order"` // display order within group
URL string `yaml:"url"` // optional link to service
// Health check configuration (for external monitoring tools)
HealthEndpoint string `yaml:"health_endpoint"` // endpoint to check (e.g., /health)
HealthInterval int `yaml:"health_interval"` // check interval in seconds (0 = disabled)
// Uptime tracking configuration
Uptime UptimeConfig `yaml:"uptime"`
// Computed uptime data (populated at build time for mode: incidents)
UptimeData *UptimeData `yaml:"-" json:"uptime_data,omitempty"`
}
StatusComponent represents a service or component being monitored
type StatusConfig ¶
type StatusConfig struct {
Enabled bool `yaml:"enabled"`
Title string `yaml:"title"`
Description string `yaml:"description"`
Path string `yaml:"path"` // output path (default: "status")
ShowHistory bool `yaml:"show_history"` // show incident history
HistoryMonths int `yaml:"history_months"` // months of history to show (default: 12)
RSSEnabled bool `yaml:"rss_enabled"` // generate RSS feed
}
StatusConfig holds configuration for the status page
func DefaultStatusConfig ¶
func DefaultStatusConfig() StatusConfig
DefaultStatusConfig returns a StatusConfig with sensible defaults
type StatusPage ¶
type StatusPage struct {
Config StatusConfig
Components []StatusComponent
ComponentGroups map[string][]StatusComponent // grouped by Group field
ActiveIncidents []Incident
ResolvedIncidents []Incident
ScheduledMaintenance []Maintenance
ActiveMaintenance []Maintenance
OverallStatus ComponentStatus
LastUpdated time.Time
HistoryByMonth map[string][]Incident // "2025-01" -> incidents
}
StatusPage represents the complete status page data
type StepItem ¶
type StepItem struct {
Title string `yaml:"title"`
Description string `yaml:"description"`
Code string `yaml:"code"`
}
StepItem represents a single step
type StepsSection ¶
type StepsSection struct {
Title string `yaml:"title"`
Items []StepItem `yaml:"items"`
Background SectionBackground `yaml:"background"`
}
StepsSection represents the how-to/quick start section
type TOCItem ¶
type TOCItem struct {
ID string // Anchor ID (e.g., "getting-started")
Title string // Heading text
Level int // Heading level (1-6)
Children []*TOCItem // Nested headings
}
TOCItem represents a single heading in the table of contents
type Testimonial ¶
type Testimonial struct {
Quote string `yaml:"quote"`
Author string `yaml:"author"`
Role string `yaml:"role"`
Avatar string `yaml:"avatar"`
}
Testimonial represents a single testimonial
type TestimonialsSection ¶
type TestimonialsSection struct {
Title string `yaml:"title"`
Items []Testimonial `yaml:"items"`
Background SectionBackground `yaml:"background"`
}
TestimonialsSection represents the testimonials section
type TextSection ¶
type TextSection struct {
ID string `yaml:"id"` // Section ID for ordering
Title string `yaml:"title"`
Subtitle string `yaml:"subtitle"`
Content string `yaml:"content"` // Markdown content
Alignment string `yaml:"alignment"` // left, center, right (default: center)
MaxWidth string `yaml:"max_width"` // Max width (e.g., "800px")
Buttons []HeroButton `yaml:"buttons"` // Optional CTA buttons
Background SectionBackground `yaml:"background"`
Order int `yaml:"order"` // Display order
}
TextSection represents a simple text block section
type ThemeColorSet ¶
type ThemeColorSet struct {
// Backgrounds
BgPrimary string `yaml:"bg_primary"`
BgSecondary string `yaml:"bg_secondary"`
BgTertiary string `yaml:"bg_tertiary"`
BgCode string `yaml:"bg_code"`
BgHover string `yaml:"bg_hover"`
// Text
TextPrimary string `yaml:"text_primary"`
TextSecondary string `yaml:"text_secondary"`
TextTertiary string `yaml:"text_tertiary"`
TextMuted string `yaml:"text_muted"`
// Borders
BorderPrimary string `yaml:"border_primary"`
BorderSecondary string `yaml:"border_secondary"`
// Accents
AccentPrimary string `yaml:"accent_primary"`
AccentHover string `yaml:"accent_hover"`
// Links
LinkColor string `yaml:"link_color"`
LinkHover string `yaml:"link_hover"`
// Status colors
ColorSuccess string `yaml:"color_success"`
ColorWarning string `yaml:"color_warning"`
ColorDanger string `yaml:"color_danger"`
ColorInfo string `yaml:"color_info"`
}
ThemeColorSet defines a complete set of theme colors
type ThemeColors ¶
type ThemeColors struct {
// Light mode colors
Light ThemeColorSet `yaml:"light"`
// Dark mode colors
Dark ThemeColorSet `yaml:"dark"`
}
ThemeColors defines customizable color variables
type ThemeConfig ¶
type ThemeConfig struct {
Name string `yaml:"name"` // Theme name: "default", "dark", or custom
Colors ThemeColors `yaml:"colors"` // Custom color overrides
Fonts ThemeFonts `yaml:"fonts"` // Custom font settings
Hero ThemeHero `yaml:"hero"` // Hero section styling
}
ThemeConfig holds theme customization settings
func DefaultThemeConfig ¶
func DefaultThemeConfig() ThemeConfig
DefaultThemeConfig returns a ThemeConfig with sensible defaults
func (*ThemeConfig) HasCustomColors ¶
func (t *ThemeConfig) HasCustomColors() bool
HasCustomColors returns true if any custom colors are defined
func (*ThemeConfig) HasCustomFonts ¶
func (t *ThemeConfig) HasCustomFonts() bool
HasCustomFonts returns true if any custom fonts are defined
func (*ThemeConfig) HasHeroBackground ¶
func (t *ThemeConfig) HasHeroBackground() bool
HasHeroBackground returns true if hero background is configured
type ThemeFonts ¶
type ThemeFonts struct {
Heading string `yaml:"heading"` // Font family for headings
Body string `yaml:"body"` // Font family for body text
Code string `yaml:"code"` // Font family for code
GoogleURL string `yaml:"google_url"` // Google Fonts import URL
}
ThemeFonts defines custom font settings
type ThemeHero ¶
type ThemeHero struct {
BackgroundImage string `yaml:"background_image"` // Background image URL
BackgroundOverlay string `yaml:"background_overlay"` // Overlay color (e.g., "rgba(0,0,0,0.6)")
TextAlign string `yaml:"text_align"` // Text alignment: left, center, right
MinHeight string `yaml:"min_height"` // Minimum height (e.g., "80vh")
}
ThemeHero defines hero section styling
type UptimeConfig ¶
type UptimeConfig struct {
Mode string `yaml:"mode" json:"mode"` // "api" or "incidents"
Endpoint string `yaml:"endpoint" json:"endpoint"` // API endpoint (for mode: api)
SLATarget float64 `yaml:"sla_target" json:"sla_target"` // target SLA percentage (e.g., 99.9)
PeriodDays int `yaml:"period_days" json:"period_days"` // history period in days (default: 90)
}
UptimeConfig holds configuration for uptime tracking
func DefaultUptimeConfig ¶
func DefaultUptimeConfig() UptimeConfig
DefaultUptimeConfig returns an UptimeConfig with sensible defaults
type UptimeData ¶
type UptimeData struct {
Mode string `json:"mode"` // "api" or "incidents"
PeriodDays int `json:"period_days"` // number of days in history
UptimePercent float64 `json:"uptime_percent"` // overall uptime percentage
History []UptimeDay `json:"history"` // daily history (newest first)
SLA SLAStats `json:"sla"` // SLA statistics
}
UptimeData holds complete uptime information for a component
type UptimeDay ¶
type UptimeDay struct {
Date string `json:"date"` // "2025-01-28" format
Status string `json:"status"` // operational, degraded, partial_outage, major_outage, maintenance
DowntimeMinutes int `json:"downtime_minutes"` // total downtime in minutes for this day
}
UptimeDay represents a single day's uptime status
type VersionConfig ¶
type VersionConfig struct {
Enabled bool `yaml:"enabled"`
Default string `yaml:"default"` // Default version slug (e.g., "v2")
List []VersionInfo `yaml:"list"` // Available versions
Selector VersionSelector `yaml:"selector"` // UI selector configuration
}
VersionConfig holds the configuration for multi-version documentation
func DefaultVersionConfig ¶
func DefaultVersionConfig() VersionConfig
DefaultVersionConfig returns a VersionConfig with sensible defaults
func (*VersionConfig) GetDefaultVersion ¶
func (c *VersionConfig) GetDefaultVersion() *VersionInfo
GetDefaultVersion returns the default VersionInfo
func (*VersionConfig) GetVersion ¶
func (c *VersionConfig) GetVersion(name string) *VersionInfo
GetVersion returns the VersionInfo for a given version name
type VersionInfo ¶
type VersionInfo struct {
Name string `yaml:"name"` // Version identifier (e.g., "v2")
Label string `yaml:"label"` // Display label (e.g., "2.x (Latest)")
Path string `yaml:"path"` // URL path prefix (e.g., "v2")
EOL string `yaml:"eol"` // End of life date (YYYY-MM-DD), empty if still supported
}
VersionInfo represents a single documentation version
func (*VersionInfo) IsEOL ¶
func (v *VersionInfo) IsEOL() bool
IsEOL returns true if the version has reached end of life
type VersionSelector ¶
type VersionSelector struct {
Position string `yaml:"position"` // "header" or "sidebar"
ShowEOLWarning bool `yaml:"show_eol_warning"` // Show warning badge for EOL versions
}
VersionSelector configures the version selector UI
type VersionedSite ¶
type VersionedSite struct {
Version VersionInfo // Current version being built
Pages []*Page // Pages for this version
OutputRoot string // Output directory for this version
}
VersionedSite represents a site built for a specific version
type WaitlistConfig ¶
type WaitlistConfig struct {
Enabled bool `yaml:"enabled"`
Title string `yaml:"title"`
Tagline string `yaml:"tagline"`
NewsletterEndpoint string `yaml:"newsletter_endpoint"`
SiteID string `yaml:"site_id"`
SuccessMessage string `yaml:"success_message"`
SocialLinks []WaitlistSocialLink `yaml:"social_links"`
PrivacyURL string `yaml:"privacy_url"`
}
WaitlistConfig holds configuration for the waitlist landing page
func DefaultWaitlistConfig ¶
func DefaultWaitlistConfig() WaitlistConfig
DefaultWaitlistConfig returns a WaitlistConfig with sensible defaults
type WaitlistPage ¶
type WaitlistPage struct {
Config WaitlistConfig
}
WaitlistPage represents the waitlist page data passed to the template
type WaitlistSocialLink ¶
type WaitlistSocialLink struct {
Name string `yaml:"name"` // Platform name (github, twitter, discord, etc.)
URL string `yaml:"url"` // Link URL
}
WaitlistSocialLink represents a social link on the waitlist page