Important Types

All types are defined in hand-written .d.ts files. This page maps the types that define runtime contracts between core and plugins.

Configuration Types (base/src/config.d.ts)

TypeDescription
ShevkyConfigRoot configuration shape with all sections
ConfigApiConfig object with load(path) and get(key) methods
SeoConfigSEO defaults (defaultImage, includeCollections, etc.)
AnalyticsConfigAnalytics provider IDs
FeaturesConfigUI feature toggles
PostOperationsConfigPost interaction controls
ShareOptionsPer-network share button toggles
MarkdownConfigMarkdown renderer options
PaginationConfigPage size and localized segments
ContentConfigPagination, languages, collections
BuildConfigMinify, debug, buffer limits, aliases
IdentityConfigAuthor, email, URL, theme, social
SocialIdentityConfigSocial media account URLs
RobotsConfigAllow/disallow paths

Plugin Contract Types (base/src/plugin.d.ts)

TypeDescription
PluginDefinitionPlugin shape: { name, version, hooks, load? }
PluginHookEnum of lifecycle hook values
PluginHooksPartial record mapping hook names to handlers
HookHandler(ctx: PluginContext) => Promise<void> | void
PluginContextFull context with config, log, file, directory, path, paths, contentFiles
BasePluginContextContext without paths
PluginLoadContextMinimal context: { config, paths }
PluginPathsProject directories (root, src, dist, content, etc.)
SchemaTypeUnion: "post" | "job-post" | ... | "policy"
CollectionType"tag" | "category" | "series"

Content Types (base/src/plugin.d.ts)

TypeDescription
ContentHeaderLikeFront matter field shape
ContentBodyLikeBody content wrapper
ContentFileLikeCombined content file for plugin interaction
ContentSummaryLikeSummary projection (id, title, date, etc.)

Utility API Types

TypeFileDescription
IoApibase/src/io.d.tsFile, directory, path, URL operations
ExecApibase/src/exec.d.tsProcess execution and module resolution
I18nApibase/src/i18n.d.tsInternationalization helpers
FormatApibase/src/format.d.tsFormatting and type guard utilities
LogApibase/src/log.d.tsLogging interface

Core Types (core/types/index.d.ts)

TypeDescription
ProjectPathsAll project directory paths
PluginInstanceLoaded plugin runtime object
PluginExecutionContextExtended context for hook execution
ContentFileLikeContent file shape for core
CollectionEntryContent summary with collection type
CollectionsByLangRecord<string, Record<string, CollectionEntry[]>>
FooterPolicyFooter policy link
FrontMatterRecord<string, any>
PlaceholderMarkdown component placeholder

Plugin-Specific Types

TypePackageDescription
RssPluginConfigplugin-rssFeed filename, TTL, item count
SitemapPluginConfigplugin-sitemapSitemap filename
ContentBridgeConfigplugin-content-bridgeSources, maxItems, output
ContentBridgeSourceplugin-content-bridgeFetch, mapping, per-source config
ContentBridgeFetchConfigplugin-content-bridgeURL, method, headers, pagination
ContentBridgePaginationplugin-content-bridgeMode, params, cursors
ContentBridgeMappingplugin-content-bridgeFront matter, content, sourcePath mapping

Known Type Mismatch

In core/types/index.d.ts, PluginInstance.load is typed as required. In the runtime (core/registries/pluginRegistry.js), load is treated as optional (if (instance.load)). This matters if you rely on strict type checking.

Related