This document describes the recommended content model for PowerForge.Web. It is designed to be reusable across many projects (products, docs, blogs).
site.json
content/
pages/
docs/
blog/
snippets/
data/
projects/
ProjectA/
project.json
content/
pages/
docs/
blog/
data/
static/
images/
data/
vendor/
themes/
base/
nova/
shared/
snippets/
data/
You can compose a site from a shared base spec and project‑specific overrides
using extends in site.json.
Example:
{
"extends": ["../shared/site.base.json"],
"name": "ExampleDocs",
"baseUrl": "https://example.com",
"defaultTheme": "exampledocs",
"navigation": {
"menus": [
{ "name": "main", "items": [{ "title": "Home", "url": "/" }] }
]
}
}Rules:
extendsaccepts a string or array of strings.- Paths are resolved relative to the current
site.json. - Multiple bases are merged in order; the current file wins.
- Objects are merged deeply; arrays are replaced (not concatenated).
All content files are Markdown with optional front matter:
---
title: Getting Started
description: Quick start guide for ProductX.
date: 2026-01-26
tags:
- docs
- quickstart
aliases:
- /getting-started/
layout: docs
template: page
outputs:
- html
- json
meta.eyebrow: Documentation
---
# Getting Started
Markdown parsing target is GitHub-like flavor (GFM-style) for predictable docs behavior.
Notably, definition-list parsing is disabled by default, so prose like Q: / A: does not
silently turn into <dl>/<dt>/<dd> structures.
Supported fields:
title,description,datetags,aliasesslug,order,draftlanguage/lang(page language code when localization is enabled)translation_key(shared key used to map the same page across languages)- aliases:
translation.key,translationKey,i18n.key,i18n.translation_key,i18n.translationKey,i18n.group
- aliases:
i18n.routes.<lang>/i18n.route.<lang>(explicit per-language route override for language switch/hreflang)- aliases:
i18n.urls.<lang>,i18n.url.<lang>,translations.<lang>.route,translations.<lang>.url,translations.<lang>.path
- aliases:
i18n.aliases.<lang>(per-language legacy aliases that generate redirects)- aliases:
aliases.<lang>,translations.<lang>.aliases,translations.<lang>.alias - optional shared aliases:
i18n.aliases.default,i18n.aliases.all,aliases.default,aliases.all
- aliases:
layout,template,collectioncanonical,editpathmeta.*(custom data exposed to templates)meta.raw_html(skip markdown rendering, treat content as HTML)meta.render=html(skip markdown rendering)meta.format=html(skip markdown rendering)meta.body_class(optional body class)meta.social(enable social tags for this page when configured)meta.social_card(force/skip generated social card for this page)meta.social_card_badge(generated card top-right badge text)meta.social_card_route(generated card bottom route label text)meta.social_card_style(generated card style:default/docs/api/editorial)meta.social_card_variant(generated card layout variant:standard/hero/compact)meta.structured_data(enable JSON‑LD breadcrumbs for this page when configured)meta.head_html(raw HTML appended into<head>)meta.head_file(path to a file appended into<head>)meta.extra_css(raw CSS link tags appended into<head>)meta.extra_scripts(raw script tags appended before</body>)meta.extra_scripts_file(path to a file appended before</body>)meta.content_engine(render the page body as a template before Markdown)meta.prism(enable/disable Prism syntax highlighting for fenced code blocks; default: auto)meta.prism_mode(auto,always,off)meta.prism_source(local,cdn,hybrid)meta.prism_cdn(override Prism CDN base URL; default:https://cdn.jsdelivr.net/npm/prismjs@1.29.0)meta.prism_default_language(default language for code blocks without a language)meta.prism_css_light/meta.prism_css_dark(local Prism theme paths)meta.prism_core/meta.prism_autoloader(local Prism script paths)meta.prism_lang_path(local Prism language components base path)meta.xref/meta.xrefs/meta.uid/meta.uids(optional xref IDs for this page)
Use xref: links in markdown to reference symbols/pages by ID:
[Install guide](xref:docs.install)
[String.Length](xref:System.String#Length)The engine resolves xrefs from:
- page IDs declared in front matter (
xref/xrefs/uid/uids) - implicit page IDs (
collection:slug, route, translation key, source-based IDs) - optional external map files from
site.json -> Xref.MapFiles- API docs generators can emit DocFX-style
xrefmap.jsonfiles (C# + PowerShell), which are validMapFilesinputs.
- API docs generators can emit DocFX-style
Optional site.json config:
{
"Xref": {
"Enabled": true,
"MapFiles": ["xrefmap.json"],
"WarnOnMissing": true,
"EmitMap": true,
"MaxWarnings": 25
}
}When EmitMap is enabled, the build writes _powerforge/xrefmap.json.
PowerForge.Web automatically injects Prism assets when a page contains fenced code blocks.
To disable highlighting on a page, set meta.prism: false. To force it on a page
without detected code blocks, set meta.prism: true. Use meta.prism_source to
force local vs CDN per page.
PowerForge.Web resolves missing values using simple defaults:
title:front matter title→ first# H1→ filenameslug:front matter slug→ filenamedescription:front matter description(no automatic fallback)date:front matter date(no git/mtime fallback yet)verifywarns when editorial posts (blog/news/changelogpresets) omitdate
Use meta.content_engine when you need template logic inside page content.
The content is rendered before Markdown, so you can generate Markdown or HTML.
Supported engines:
scriban(full template language, loops/conditionals)simple(token replacement:{{TITLE}},{{DESCRIPTION}},{{CONTENT}}, etc.)theme(use the current theme engine)
Example:
---
title: Home
meta.content_engine: scriban
meta.raw_html: true
---
<section class="faq">
{{ for item in data.faq }}
<details>
<summary>{{ item.question }}</summary>
<div>{{ item.answer }}</div>
</details>
{{ end }}
</section>
Routes are built from Collection.Output + slug:
index.mdorslug: indexmaps to the collection rootslugcan include slashes to create nested paths
Examples (collection output = /docs):
getting-started.md→/docs/getting-started/index.md→/docs/slug: guides/install→/docs/guides/install/
When files live inside folders, the folder path becomes part of the route:
content/docs/guides/install.md -> /docs/guides/install/
If a folder contains _index.md, it becomes a section/list page for that folder.
The route is the folder path:
content/docs/guides/_index.md -> /docs/guides/
If a folder contains index.md and no other markdown files, it becomes a leaf bundle.
All non‑markdown files in that folder are copied to the page output folder:
content/docs/getting-started/index.md
content/docs/getting-started/hero.png
Output:
/docs/getting-started/index.html
/docs/getting-started/hero.png
Trailing slash behavior is controlled by site.json → TrailingSlash:
always/never/ignore
Enable multi-language URLs in site.json:
{
"Localization": {
"Enabled": true,
"DefaultLanguage": "en",
"PrefixDefaultLanguage": false,
"DetectFromPath": true,
"FallbackToDefaultLanguage": true,
"Languages": [
{ "Code": "en", "Label": "English", "Default": true, "BaseUrl": "https://example.com" },
{ "Code": "pl", "Label": "Polski", "BaseUrl": "https://example.pl" }
]
}
}When DetectFromPath is enabled, a leading language folder in content paths is used as language marker and removed from slug generation:
content/docs/en/index.md→/docs/(default language, no prefix whenPrefixDefaultLanguage=false)content/docs/pl/index.md→/pl/docs/
Use translation_key when page paths differ per language and you still want reliable language switcher links.
This is the recommended way to keep one logical page mapped across translated slugs.
If you need strict/manual mapping, add explicit route overrides in front matter:
i18n.routes.en: /docs/faq-english/i18n.routes.pl: /pl/docs/faq-polski/
Nested front matter blocks are supported natively as well (recommended for readability):
i18n:->group,language,aliases.<lang>translations:-><lang>.route|url|path,<lang>.aliases
This is useful when language variants have different slugs and do not share the same source ID history.
When FallbackToDefaultLanguage is enabled and a translated page is missing,
language switcher links resolve to the default-language route instead of a non-existent target-language URL.
Use language-level BaseUrl when localized variants live on different domains.
When set, hreflang head links and sitemap alternates use the language domain instead of the site BaseUrl.
When localization is enabled and at least two languages are configured:
- Page
<head>output includesrel="alternate"language links (hreflang) for localized variants. - The default language variant also emits
hreflang="x-default". - Search output is emitted as:
/search/index.json(all languages)/search/<language>/index.json(language shard, for example/search/pl/index.json)/search/collections/<collection>/index.json(collection shard, for example/search/collections/docs/index.json)/search/manifest.json(discoverability manifest for shards + search surface path)/search/index.html(auto-generated search page whenFeaturesincludessearchand no custom page exists)
Collections map markdown inputs to output routes:
{
"Name": "docs",
"Input": "content/docs",
"Output": "/docs",
"DefaultLayout": "docs",
"ListLayout": "docs-list",
"Include": ["*.md", "**/*.md"],
"SortBy": "order",
"SortOrder": "asc"
}ListLayout is used for _index.md section pages.
Use Preset for WordPress-like behavior with sensible defaults:
blog:post+list, newest-first, page size10, auto section index enablednews:post+list, newest-first, page size15, auto section index enabledchangelog(alsorelease-notes/releases):post+list, newest-first, page size30, auto section index enablededitorial: generic editorial stream (post+list, newest-first, auto section index)docs:docs+docs-list, order-firstknowledgebase/kb: docs-like ordering and layoutspages/landing: page-oriented ordering defaults
Example with a custom collection name:
{
"Name": "updates",
"Preset": "blog",
"Input": "content/updates",
"Output": "/updates"
}This gives blog behavior even though the collection name is not literally blog.
For editorial-like collections you can let PowerForge generate the landing page
when no non-draft _index.md/slug:index page exists:
{
"Name": "blog",
"Input": "content/blog",
"Output": "/blog",
"ListLayout": "list",
"AutoGenerateSectionIndex": true,
"AutoSectionTitle": "Blog",
"AutoSectionDescription": "Product updates and walkthroughs."
}This removes the need to manually maintain a blog/news landing page file just to expose latest posts.
You can define default card rendering behavior for a collection, so themes can call
{{ pf.editorial_cards }} without repeating image and class arguments everywhere:
{
"Name": "blog",
"Preset": "blog",
"Input": "content/blog",
"Output": "/blog",
"EditorialCards": {
"Image": "/images/blog-fallback.png",
"ImageAspect": "3:2",
"ImageFit": "contain",
"ImagePosition": "top center",
"Variant": "featured",
"GridClass": "blog-grid",
"CardClass": "blog-card"
}
}Supported EditorialCards fields:
Image: fallback card image when a post has no image metadataImageAspect: default aspect ratio (for example16/9,4:3,3:2)ImageFit: defaultobject-fit(cover,contain,fill,none,scale-down)ImagePosition: defaultobject-position(for examplecenter,top center,20% 30%)Variant: default helper variant (default,compact,hero,featured)GridClass,CardClass: default CSS class overrides for wrapper/card elementsShowCategories: defaultshow_categorieshelper behavior when argument is omittedLinkTaxonomy: defaultlink_taxonomyhelper behavior when argument is omitted
SortBy and SortOrder apply to section list item ordering:
- Supported
SortBy:order,date,title,slug,route(path/urlaliases) SortOrder:asc/desc
Default behavior:
- editorial collections (
blog/news) default todate desc(newest first) - other collections default to
order asc, then title
Collections can define a table of contents file (DocFX‑style):
{
"TocFile": "content/docs/toc.json"
}If present, this TOC drives navigation instead of folder structure.
Supported formats: toc.json, toc.yml, toc.yaml.
To force auto navigation from folders even when a TOC exists, disable it:
{
"UseToc": false
}When UseToc is true, powerforge web verify warns about pages that are
missing from the TOC. If UseToc is true but no toc.json / toc.yml is found,
powerforge web verify emits a warning so you don’t silently fall back.
By default, localization verification expects every translation_key to exist in
every configured site language. For mixed sites, you can narrow that expectation
per collection:
{
"Name": "blog",
"Preset": "blog",
"Input": "content/blog",
"Output": "/blog",
"ExpectedTranslationLanguages": [ "en", "pl" ]
}Use this when a collection intentionally publishes only a subset of the site’s languages, while other collections still require the full localization set.
JSON files under data/ become data.<fileName> in Scriban.
data/
hero.json -> data.hero
sections.json -> data.sections
showcase.json -> data.showcase
Use data for repeated UI blocks and long lists.
powerforge web verify validates known data files when present (faq.json, showcase.json,
pricing.json, benchmarks.json). It emits warnings for missing required keys and malformed shapes.
When no data/site-nav.json exists in the site output, PowerForge.Web will
emit one based on site.json navigation (including auto‑generated menus).
If you provide your own data/site-nav.json (for example via static/data),
the generator will not overwrite it.
The generated site-nav.json also includes:
schemaVersion: export payload version (allows safe evolution for external consumers)format: stable payload identifier (powerforge.site-nav)surfaceCanonicalNames: canonical surface keys (main,docs,apidocs,products)surfaceAliases: alias map for compatibility (api->apidocs)profiles: exportedNavigation.Profilesrules (so other tools can select the same nav your theme uses)surfaces: resolved navigation projections for stable "nav surfaces" likemain,docs,apidocs,products.- surface keys are exported in canonical form (
apidocs, notapi/apiDocs). - Use
Navigation.Surfacesinsite.jsonto define/override; each surface captures the selected profile context and resolved menu projections (primary, optionalsidebar, optionalproducts).
- surface keys are exported in canonical form (
Data keys ending with _md or _markdown are automatically rendered as HTML.
The rendered value is exposed under the base key (suffix removed) if the base key is missing.
Examples:
{
"answer_md": "This **supports Markdown**.",
"paragraphs_md": ["First paragraph.", "Second paragraph."]
}
Becomes:
answer: "<p>This <strong>supports Markdown</strong>.</p>"
paragraphs: ["<p>First paragraph.</p>", "<p>Second paragraph.</p>"]
PowerForge.Web normalizes common content data so JSON stays portable and forgiving:
faq.sections[*].items[*].answeris always treated as a list of blocks (strings), even if provided as a single string.pricing.note.paragraphs,pricing.cards[*].features,benchmarks.about.cards[*].paragraphs, andbenchmarks.notes.itemsare normalized to lists.- Common camelCase keys are aliased to snake_case for compatibility with existing templates:
iconSvg→icon_svgiconClass→icon_classamountClass→amount_classthumbLabel→thumb_labelthumbSrc→thumb_srcdotStyle→dot_style
Recommended shapes:
FAQ (data/faq.json):
{
"hero": { "label": "Support", "title": "FAQ", "description": "..." },
"sections": [
{
"title": "General",
"items": [
{ "id": "what-is", "question": "What is X?", "answer": ["<p>...</p>"] }
]
}
]
}
Showcase (data/showcase.json):
{
"hero": { "label": "Built with X", "title": "Showcase", "description": "..." },
"cards": [
{
"id": "app1",
"title": "App One",
"icon_svg": "<svg>...</svg>",
"meta": [{ "label": ".NET 8" }],
"features": ["Fast", "Portable"]
}
]
}
Pricing (data/pricing.json):
{
"hero": { "label": "Pricing", "title": "Simple pricing", "description": "..." },
"cards": [
{
"title": "Free",
"amount": "Free",
"features": ["All features"],
"cta": { "label": "Install", "href": "https://..." }
}
],
"note": { "title": "Why support?", "paragraphs": ["<p>...</p>"] }
}
Benchmarks (data/benchmarks.json):
{
"hero": { "title": "Benchmarks", "intro": "..." },
"about": { "cards": [{ "title": "Quick vs Full", "paragraphs": ["<p>...</p>"] }] },
"notes": { "items": ["Note 1", "Note 2"] }
}
Some pages can be rendered from JSON when present, while still supporting normal Markdown. Enable this via front matter:
meta.data_shortcode: faq
meta.data_path: faq
meta.data_mode: override
Behavior:
- If
data_pathexists indata/, the shortcode renders and overrides the body. - If the data does not exist, the markdown body is used.
meta.data_modesupports:override(default),prepend,append.
This is intended for FAQ/Showcase/Benchmarks/Pricing pages where JSON may be preferred.
Shortcodes available by default: faq, showcase, benchmarks, pricing, cards, metrics, edit-link.
Use StaticAssets in site.json to copy folders/files to the output root.
This is intended for images, data feeds, vendor files, or other assets
that should live at /images, /data, /vendor, etc.
{
"StaticAssets": [
{ "Source": "static" }
]
}Each entry supports:
Source: path relative to the site root (file or folder)Destination: optional output subfolder (defaults to/)
Shortcodes keep markdown clean while rendering complex blocks. Examples:
{{< cards data="features" >}}
{{< metrics data="stats" >}}
{{< showcase data="showcase" >}}
{{< map query="Evotec Services, Mikolow" title="Office map" >}}
{{< app src="/playground/" label="Launch Playground" title="Playground" >}}
{{< edit-link >}}
Shortcodes can be implemented as:
- code handlers (C#), or
- theme partials
partials/shortcodes/<name>.html
Navigation lives in site.json under Navigation:
Navigation.Menus(primary structures)Navigation.Actions(header CTA/icon links)Navigation.Regions(named slots likeheader.left,header.right,mobile.drawer)Navigation.Footer(columns + legal links)Navigation.Profiles(path/layout/collection/project scoped overrides)
If the header logo supplies the home link, set Navigation.HomeLinkInBrand to true.
This lets the main menu focus on other destinations without producing the missing-Home
verification warning. The default is false, which retains the explicit / menu-item
check. This setting declares the theme's responsibility; it does not render a logo or
prove that one exists. Render an accessible link to the appropriate localized homepage
and include it in your rendered navigation checks. Other navigation checks remain enabled.
Templates receive a computed navigation object with active states.
Best practice (theme rendering):
- Use menu names (e.g.
main,docs) rather than index-based access (navigation.menus[0]) so your theme is deterministic across sites. - In Scriban themes you can use built-in helpers exposed as
pf:{{ pf.nav_links "main" }}renders the main menu as a flat list of<a>elements (supportsis-active/is-ancestorclasses).{{ pf.nav_actions }}rendersNavigation.Actionsas links/buttons.{{ pf.menu_tree "docs" 4 }}renders a nested<ul>tree for sidebar menus.{{ pf.editorial_cards }}renders reusable card markup from current list context (items) with optional arguments:max_items(default0= all)excerpt_length(default160)show_collection,show_date,show_tags,show_image(defaultstrue)image_aspect(optional; when omitted, helper usescollection.EditorialCards.ImageAspect, then16/9)fallback_image(optional; when omitted, helper usescollection.EditorialCards.Image, thensite.social.image)variant(optional; when omitted, helper usescollection.EditorialCards.Variant, then"default"; options:"default","compact","hero","featured")grid_class(optional; when omitted, helper usescollection.EditorialCards.GridClass)card_class(optional; when omitted, helper usescollection.EditorialCards.CardClass)show_categories(optional; when omitted, helper usescollection.EditorialCards.ShowCategories, thenfalse; readscategoriestaxonomy/meta values)link_taxonomy(optional; when omitted, helper usescollection.EditorialCards.LinkTaxonomy, thenfalse; renders tag/category chips as links to taxonomy term pages)- Example:
{{ pf.editorial_cards 12 180 true true true true "4:3" "/images/fallback.png" "hero" "news-grid custom-grid" "news-card custom-card" true true }} - Per-item front matter metadata (stored under
meta) supported by helper:cardImage/card_image/card.imagecardImageAlt/card_image_alt/card.image.altcardImageFit/card_image_fit/card.image.fitcardImagePosition/card_image_position/card.image.position
- Image fallback priority: card-specific image keys → generic image keys (
image/cover/thumbnail) → social image keys → collection/site fallback. - Verify integration: if the theme defines
featureContracts.blog/news, verify checks that variant and override selectors used bypf.editorial_cardsare declared inrequiredCssSelectors, with copy/paste contract hints (including likelycssHrefscandidates when detectable) when missing.
{{ pf.editorial_pager }}renders previous/next pagination links from runtimepagination:newer_label(default"Newer posts")older_label(default"Older posts")css_class(default"pf-pagination")- Example:
{{ pf.editorial_pager "Newer" "Older" }}
{{ pf.editorial_post_nav }}renders post-level navigation for editorial collections (back to list, newer/older links, related posts):back_label(default"Back to list")newer_label(default"Newer post")older_label(default"Older post")related_heading(default"Related posts")related_count(default3, max8)css_class(default"pf-post-nav")- Example:
{{ pf.editorial_post_nav "Back to blog" "Newer" "Older" "You may also like" 4 "post-nav" }}
The runtime navigation object exposes navigation.surfaces as named projections.
PowerForge can infer defaults (main, docs, apidocs, products) from features/menus, but production sites should define Navigation.Surfaces explicitly so verify/nav-lint checks stay deterministic.
This helps themes avoid hard-coding assumptions like "docs sidebar == menu named docs" and supports multi-surface headers (main/products/docs).
Example:
{
"Navigation": {
"Surfaces": [
{ "Name": "main", "PrimaryMenu": "main" },
{ "Name": "docs", "PrimaryMenu": "main", "SidebarMenu": "docs" },
{ "Name": "products", "PrimaryMenu": "main", "ProductsMenu": "products" }
]
}
}In Scriban you can then do:
{{ if navigation.surfaces && navigation.surfaces.size > 0 }}
{{ for s in navigation.surfaces }}
{{ if s.name == "docs" && s.sidebar }}
{{ for link in s.sidebar.items }} ... {{ end }}
{{ end }}
{{ end }}
{{ end }}
If Navigation is omitted, PowerForge.Web generates sensible defaults:
- A
docsmenu from thedocscollection (or any collection whose output starts with/docs). - A
mainmenu from thepagescollection (or any collection whose output is/).
To disable this default behavior, define Navigation and set:
{ "Navigation": { "AutoDefaults": false } }Navigation.Actions is for header buttons/icons (theme toggles, GitHub, CTA).
These items are exposed as navigation.actions.
You can also generate navigation from folder structure:
{
"Navigation": {
"Auto": [
{ "Collection": "docs", "Menu": "docs", "MaxDepth": 3 }
]
}
}Use meta.nav.* to override auto‑nav labels:
meta.nav.title: Install
meta.nav.weight: 20
meta.nav.hidden: true
Example actions (link + button):
{
"Navigation": {
"Actions": [
{ "Title": "Theme", "Kind": "button", "CssClass": "nav-icon theme-cycle-btn" },
{ "Title": "GitHub", "Url": "https://github.com/org/repo", "External": true, "CssClass": "nav-icon" }
]
}
}Use visibility filters to scope nav elements:
{
"Navigation": {
"Menus": [
{
"Name": "main",
"Visibility": { "Paths": ["/docs/**"] },
"Items": [
{ "Title": "Docs", "Url": "/docs/" },
{
"Title": "API",
"Url": "/api/",
"Visibility": { "Projects": ["core"] }
}
]
}
]
}
}Use regions for complex headers and profiles for route-specific nav variants:
{
"Navigation": {
"Regions": [
{ "Name": "header.left", "Menus": ["main"] },
{ "Name": "header.right", "IncludeActions": true }
],
"Footer": {
"Label": "default",
"Menus": ["footer-product", "footer-company"],
"Legal": [
{ "Title": "Privacy", "Url": "/privacy/" },
{ "Title": "Terms", "Url": "/terms/" }
]
},
"Profiles": [
{
"Name": "api",
"Paths": ["/api/**"],
"Priority": 20,
"InheritMenus": false,
"Menus": [
{
"Name": "main",
"Items": [
{ "Title": "API Home", "Url": "/api/" },
{ "Title": "Docs", "Url": "/docs/" }
]
}
]
}
]
}
}Each menu item can optionally define Sections/Columns for richer dropdowns:
{
"Title": "Products",
"Sections": [
{
"Title": "SDK",
"Items": [
{ "Title": ".NET", "Url": "/docs/library/overview/" },
{ "Title": "PowerShell", "Url": "/docs/powershell/overview/" }
]
}
]
}Set global verify policy defaults in site.json:
{
"Verify": {
"FailOnWarnings": true,
"FailOnNavLint": true,
"FailOnThemeContract": true,
"SuppressWarnings": [
"PFWEB.NAV.LINT",
"PFWEB.THEME.CONTRACT"
]
}
}Notes:
- Applied by
powerforge-web verifyandpowerforge-web doctor. - CLI flags with the same names also enable these checks.
- Pipeline
verify/doctorstep fields override these defaults when specified.
SuppressWarnings supports:
- warning codes (for warnings prefixed like
[PFWEB.NAV.LINT] ...) - substring matches (case-insensitive)
- wildcard patterns (
*,?) - regex patterns prefixed with
re:
See Docs/PowerForge.Web.WarningCodes.md for the current code catalog.
Use aliases in front matter for old URLs.
Use Redirects or RouteOverrides in site.json for permanent site‑level rules.
Notes:
- Aliases emit exact 301 redirects to the final page route.
- Alias redirects are emitted for both slash variants (for example
/old-postand/old-post/) so legacy blog links stay non-breaking. - Set
EnableLegacyAmpRedirects: trueinsite.jsonto auto-generate compatibility redirects from/.../amproutes to canonical HTML pages. RouteOverridesare applied beforeRedirectswhen generating redirect outputs.- Redirects are emitted to host-specific formats:
_redirects(Netlify)staticwebapp.config.json(Azure Static Web Apps)vercel.json(Vercel).htaccess(Apache/mod_rewrite)nginx.redirects.conf(Nginx include snippet)web.config(IIS URL Rewrite)
- A full machine-readable list is written to:
_powerforge/redirects.json
Example (site.json):
{
"EnableLegacyAmpRedirects": true
}The sitemap task generates entries automatically and can be augmented by
explicit entries in the pipeline spec.
Defaults:
- All generated
.htmlfiles under_site/are included. robots.txt,llms.txt,llms.json,llms-full.txtare included when present.- Paths are normalized to trailing‑slash routes when they map to
index.html. - If localization config exists in
_powerforge/site-spec.json, sitemap entries include localized alternates (xhtml:link,hreflang,x-default). - When localization languages define
BaseUrl, sitemap alternates use those per-language domains. - Optional JSON output (
json: true) writes a resolved machine-readable sitemap (sitemap/index.json) including URL/title/section metadata. - Optional news sitemap output (
newsOut) emits a Google News-compatible sitemap from selected routes. - Optional image sitemap output (
imageOut) emits image discovery entries for selected routes. - Optional video sitemap output (
videoOut) emits video discovery entries for selected routes. - Optional sitemap index output (
sitemapIndex) emits asitemapindexfile referencing generated XML sitemap files.
Explicit entries:
entriesin the sitemap task override auto‑generated metadata for the same path.entriesJsoncan load entries from a JSON file ([{...}]or{ "entries":[...] }).- If a path is not present in auto output, it is still added to the sitemap.
newsPathscontrols which routes are included innewsOut; defaults target**/news/**.newsMetadatacan set publication name/language and optional genres/access/keywords.imagePaths/videoPathscontrol which routes are included inimageOut/videoOut.entries[].imagesandentries[].videoscan be used to provide explicit media URLs when route discovery is not enough.
Example task:
{
"task": "sitemap",
"siteRoot": "./_site",
"baseUrl": "https://example.com",
"entries": [
{ "path": "/docs/getting-started/", "priority": "0.9", "changefreq": "weekly" },
{ "path": "/api/", "priority": "0.8", "changefreq": "weekly" }
]
}Themes provide layouts/partials/assets. Tokens map to CSS variables:
themes/nova/theme.json
themes/nova/partials/theme-tokens.html
themes/nova/assets/app.css
site.json can enable social tags and JSON‑LD breadcrumbs:
{
"Social": {
"Enabled": true,
"SiteName": "ProductX",
"Image": "/assets/icon.png",
"ImageWidth": 1200,
"ImageHeight": 630,
"TwitterCard": "summary_large_image",
"TwitterSite": "@productx",
"TwitterCreator": "@author",
"AutoGenerateCards": true,
"GeneratedCardsPath": "/assets/social/generated",
"GeneratedCardWidth": 1200,
"GeneratedCardHeight": 630,
"GeneratedCardStyle": "default",
"GeneratedCardVariant": "product",
"GeneratedCardTheme": "product-modern",
"GeneratedCardLogo": "/assets/brand/logo.png",
"GeneratedCardThemes": {
"product-modern": {
"Style": "default",
"Variant": "product",
"ColorScheme": "light",
"Logo": "/assets/brand/logo.png",
"Tokens": {
"socialCard": {
"accent": "#2563eb",
"backgroundStart": "#ffffff",
"backgroundEnd": "#f8fafc",
"surface": "#eef2ff",
"textPrimary": "#0f172a",
"textSecondary": "#475569",
"badgeRadius": "16px"
}
},
"Metrics": [
{ "Icon": "star", "Value": "8k", "Label": "Stars" },
{ "Icon": "issue", "Value": "55", "Label": "Issues" },
{ "Icon": "fork", "Value": "948", "Label": "Forks" }
]
},
"editorial-modern": {
"Style": "blog",
"Variant": "editorial",
"ColorScheme": "light"
}
},
"GeneratedCardThemesByCollection": {
"blog": "editorial-modern",
"news": "editorial-modern"
},
"GeneratedCardStylesByCollection": {
"docs": "docs",
"blog": "editorial",
"pages": "default"
},
"GeneratedCardVariantsByCollection": {
"pages": "hero",
"docs": "compact",
"blog": "compact"
}
},
"StructuredData": {
"Enabled": true,
"Breadcrumbs": true,
"Website": true,
"Organization": true,
"WebPage": true,
"OrganizationName": "Example Software",
"OrganizationUrl": "https://publisher.example/",
"OrganizationLegalName": "Example Software Ltd.",
"OrganizationDescription": "AI-powered developer tooling.",
"OrganizationLogo": "/assets/brand/logo.png",
"OrganizationSameAs": [
"https://github.com/example/exampledocs",
"https://social.example.com/example"
],
"OrganizationEmail": "support@example.com",
"OrganizationTelephone": "+1-555-0100",
"OrganizationContactUrl": "/contact/",
"Article": true,
"FaqPage": true,
"HowTo": true,
"SoftwareApplication": true,
"SoftwareSourceCode": true,
"Product": true,
"NewsArticle": true
}
}
When enabled in site.json, social tags and structured data are emitted by default for pages.
See Structured data for linked publisher/page
identities, data-driven Scriban metadata, subscription offers and library profiles.
When Social.AutoGenerateCards is true, PowerForge.Web generates PNG social cards from
page title/description and uses them for og:image/twitter:image (unless a page sets meta.social_image).
By default this applies to share-priority pages (home, section pages, pages collection, editorial collections like blog/news).
Per-page override:
meta.social_card: true to force generation, meta.social_card: false to skip.
You can also control generated card presentation:
meta.social_card_badge: top-right category badge textmeta.social_card_route: bottom route label textmeta.social_card_theme: named generated card theme fromSocial.GeneratedCardThemesmeta.social_card_style: style key (home,default,docs,api,blog,contact,examples,downloads,release,feed,benchmark,code)meta.social_card_variant: layout variant (product,spotlight,shelf,reference,editorial,inline-image,connect,metrics,timeline,feed,code,panel)meta.social_card_logo: optional logo path/URL used inside generated cardsmeta.social_card_image: optional inline media path/URL for generated cardsmeta.social_card_image_inline: force/skip inline media rendering for generated cardsmeta.social_card_metrics: optional list/string of metric chips rendered on generated cardsmeta.social_card_chips: short labels for thepanellayout. The defaults are:meta.product_presentation.platforms- for project pages: the GitHub language plus Docs, API reference and Examples
meta.social_card_accent: hex colour that replaces the theme accent. It defaults tometa.brand.accent, so product cards use the product's colour.
The panel variant gives shared links one consistent look:
- a left accent bar
- the logo and site name
- an uppercase eyebrow, from the badge or the project type ("PowerShell module", ".NET library")
- a large title that steps down from 54 to 44 px when it is long
- a short description
- a row of chips with the site address
- a right-hand panel that shows the page image (for example a product screenshot) or up to four stats. Stats are stars, forks, downloads and the release version; issue counts and yes/no flags stay out of the panel.
To use it for whole collections:
"GeneratedCardCollections": [ "projects", "products" ],
"GeneratedCardVariantsByCollection": { "projects": "panel", "products": "panel" }GeneratedCardCollections makes every page in those collections get a generated card, even when it sets meta.social_image. That image is then shown inside the card. A page can opt out with meta.social_card: false. Generated cards always report their own size in og:image:width/og:image:height.
Generated card colors are theme-aware when theme tokens are present:
- generic theme tokens under
Tokens.color.*are used as the default palette source- expected keys:
bg,panel,ink,muted,accent,border
- expected keys:
- optional dedicated overrides under
Tokens.socialCard.*take precedence when present- supported keys:
backgroundStart,backgroundMid,backgroundEnd,surface,surfaceStroke,accent,accentSoft,accentStrong,textPrimary,textSecondary,chipBackground,chipBorder,chipText
- supported keys:
- when no usable theme tokens are available, PowerForge.Web falls back to built-in card palettes
Named generated card themes make the same visual system portable across multiple sites without
copying front matter to every page. Social.GeneratedCardThemes entries can set Style, Variant,
ColorScheme, Logo, AllowRemoteMediaFetch, and Tokens; Tokens are deep-merged over the active
theme manifest tokens before rendering. Use Social.GeneratedCardTheme as the site default,
Social.GeneratedCardThemesByCollection for collection defaults, or meta.social_card_theme for a
single page. Direct page overrides and collection-specific style/variant/color maps still win over
named theme defaults.
Generated card typography/layout can also follow theme tokens:
- generic font tokens under
Tokens.font.*displayis used for title/eyebrow by defaultbodyis used for description/badge/footer by default
- optional dedicated typography overrides under
Tokens.socialCard.*- supported font keys:
fontDisplay,fontBody,fontMono,fontEyebrow,fontBadge,fontFooter
- supported font keys:
- generic radius tokens under
Tokens.radius.*baseis used as the fallback for panel/frame radiussmis used as the fallback for badge/footer/top-band radius
- optional dedicated layout overrides under
Tokens.socialCard.*- supported size keys:
frameInset,panelInset,contentPadding,safeMarginX,safeMarginY,topBandHeight - supported vertical rhythm keys:
badgeToEyebrowGap,eyebrowToTitleGap,titleToDescriptionGap,descriptionToFooterGap - supported radius keys:
frameRadius,panelRadius,footerRadius,badgeRadius,topBandRadius - supported badge/footer keys:
badgeAlign(left/right),badgePaddingX,badgeHeight,badgeFontSize,badgeMinWidth,badgeMaxWidth,footerPaddingX,footerHeight,footerFontSize,footerMinWidth,footerMaxWidth - supported text size keys:
eyebrowFontSize,titleFontSize,descriptionFontSize - supported metric keys:
metricRowHeight,descriptionToMetricsGap,metricValueFontSize,metricLabelFontSize,metricIconSize - optional optical alignment: title text uses measured glyph ink alignment by default; set
titleOpticalOffsetexplicitly to override, settitleInkAlignInsetto tune the target visible inset, or settitleOpticalOffsetMode: "none"to force raw SVG text-origin alignment; setmonogramOpticalOffsetto tune fallback logo/monogram centering
- supported size keys:
Existing cards keep their title, text fitting, and layout defaults. The following options opt a site into page titles, concise text, and convention-based artwork:
"Social": {
"AutoGenerateCards": true,
"GeneratedCardCollections": ["pages", "docs", "guides"],
"GeneratedCardTitle": "page",
"GeneratedCardTitlesByCollection": { "guides": "seo" },
"GeneratedCardTextFit": true,
"GeneratedCardBadges": { "/widgets/": "WIDGETS", "/docs/": "DOCS", "guides": "GUIDE" },
"GeneratedCardBadgeKey": "group",
"GeneratedCardImages": {
"docs": { "Pattern": "/site/cards/{meta.card}.svg", "Fallback": "/site/nav/docs-dark.svg" },
"pages": { "Pattern": "/site/nav/{slug}-dark.svg", "Fallback": "/site/nav/home-dark.svg" }
},
"GeneratedCardImagesRequired": true,
"SocialCardsRequired": true,
"GeneratedCardFonts": [
{ "Family": "Display Face", "Weight": 700, "Path": "static/fonts/display-bold.ttf" },
{ "Family": "Display Face", "Weight": 400, "Path": "static/fonts/display-regular.ttf" },
{ "Family": "Code Face", "Weight": "100 800", "Path": "static/fonts/code-variable.ttf" }
],
"GeneratedCardTheme": "split-docs",
"GeneratedCardThemes": {
"split-docs": {
"Style": "docs",
"Variant": "split",
"Tokens": {
"socialCard": {
"fontDisplay": "Display Face",
"fontBody": "Display Face",
"fontMono": "Code Face",
"imageShare": 0.48,
"imageFit": "cover",
"imageAnchor": "left top",
"imagePadding": 0
}
}
}
}
}GeneratedCardTitleacceptsseo(the default) orpage. Collection overrides take precedence over the site setting.social_titlewins over both. These options affect the image title; page titles and OpenGraph text keep their SEO rules.- Badges resolve from
social_card_badge/social.badge, then the configured front-matter key, then the longest matching route prefix, then the collection label, then the existing inferred label. Route prefixes match whole segments:/docs/matches/docs/install/, but not/docs-extra/. - Explicit
social_card_imageartwork wins over an image pattern. Patterns can use{meta.key},{slug}, and{title}. Local paths resolve through the same site/static/content roots as other card assets. A missing placeholder or file produces a warning and uses the fallback.GeneratedCardImagesRequiredfails when neither artwork nor fallback is available. GeneratedCardTextFitusessocial_descriptionwhen present, otherwise the first sentence of the page description. It fits titles down to two lines and truncates at whole-word boundaries with an ellipsis. A single token wider than the line keeps a fitting prefix and ellipsis without splitting Unicode text elements. If a title still exceeds the minimum readable size, it is truncated to two lines. Split and code-led layouts use this fitting rule automatically.socialCard.titleMinFontSizesets the fitting floor (48 px at 1200×630 by default). Split layouts reduce description size first, to a 20 px floor, and use regular-weight muted copy. Code-led API cards remove a leadingName:description prefix when it matches the card title; PowerShell cards use thePOWERSHELLbadge.splituses a full-height right image column.imageShareis its fraction of the card width, from0.2to0.65.imageFitacceptscoverorcontain;imageAnchoraccepts combinations of left/center/right and top/center/bottom. Padding is optional and defaults to zero. SVG artwork is rasterized at the fitted size before embedding, including on Linux.- Font paths are local TTF/OTF files inside the site root. Convert WOFF2 files to TTF/OTF before declaring them. Weight accepts a number or a variable-font range. The renderer selects the nearest declared weight and draws through the exact file without installing fonts. When fonts are declared, missing files, unreadable fonts, and unavailable selected families fail explicitly instead of silently substituting another face. Font bytes participate in card hashes.
SocialCardsRequiredfails when an eligible card cannot be rendered. Opted-out pages do not require cards. Optional rendering failures warn and use the normal social-image fallback; declared-font failures remain explicit errors. Linux PNG generation requires the ImageMagick executable (magickorconvert) with SVG, MVG and PNG support on the build runner. ImageMagick 6 and 7 use the same normalized MVG path to preserve gradients and transparency. The build pipeline step can also setsocialCardsRequired: trueto enforce the same rule in CI.
Generated card data widgets:
- Metric chips can be defined at site level (
Social.GeneratedCardMetrics), named-theme level (Social.GeneratedCardThemes.<name>.Metrics), or page level (meta.social_card_metrics/meta.social.metrics). - Page-level metrics replace theme/site metrics for that page. Named-theme metrics replace site defaults when the theme is selected.
- When no metrics are configured, project pages can infer metrics from hub metadata such as
meta.project_github_stars,meta.project_github_forks,meta.project_github_open_issues,meta.project_downloads_total,meta.project_psgallery_downloads,meta.project_release_latest_tag,meta.project_github_language,meta.project_surface_docs, andmeta.project_surface_examples. - Each metric supports
Icon,Value,Label, and optionalColor. Values should be short (8k,55,1.2M) so cards stay legible in link previews. - Preferred built-in metric icons are semantic names:
star,issue,fork,users,download,discussion,pull-request,commit,tag,shield,clock,book,code,globe,activity,scale,lock,rocket,alert,x,check, andpackage. Common aliases such asstars,issues,pull-requests,release,security,docs,license, anddeployare normalized. Older placeholder glyphs such as*,!, andYare mapped to proper icons, but new configs should use semantic names. - Front matter can use an object list:
social_card_metrics: - icon: "star" value: "8k" label: "Stars" - icon: "issue" value: "55" label: "Issues"
- Short string form is also supported for simple pages:
social_card_metrics: "8k|Stars|star;55|Issues|issue;948|Forks|fork". - Treat metric cards as data-driven layouts, similar to Railway-style OG layouts: data enters as structured config, while rendering stays in the PowerForge.Web engine. Avoid generating custom images from PowerShell scripts unless a site needs an external data prefetch step.
Recommended generated-card presets for owned sites:
- Project overview pages:
style: default,variant: productorvariant: metrics; use inferred GitHub/Gallery/release metrics where available. - Project examples and sample pages:
style: examples,variant: code; metrics can show examples, snippets, downloads, or supported formats. - API/reference pages:
style: api,variant: reference. - Docs pages:
style: docs,variant: shelf. - Blog/news/RSS/feed pages:
style: blogfor editorial pages,style: feed/variant: feedfor feed landing pages. - Changelog/release pages:
style: release,variant: timeline. - Benchmark/status system pages:
style: benchmark,variant: metrics. - QR/barcode/code-generation pages:
style: code,variant: code, withcode,download,globe, orcheckmetrics as appropriate.
Generated card design guidelines:
- Keep the content column visually disciplined: badge, eyebrow, title, and description should read as one left-aligned block. The renderer aligns title ink optically so bold display glyphs such as
E,A, orTdo not appear shifted. - Keep vertical rhythm balanced: the badge-to-eyebrow and eyebrow-to-title gaps should feel related, while title-to-description should leave enough air for wrapped titles. Use the vertical rhythm tokens rather than changing renderer coordinates.
- Treat the badge as metadata, not the main brand. It should be compact, centered in its pill, and secondary to the title block.
- Use the eyebrow for brand/product/collection context. Keep it short enough to scan at social-card sizes.
- Prefer a real logo from site/page/theme config. If no logo is available, the fallback monogram is optically centered inside its frame and can be tuned with
monogramOpticalOffset. - Keep brand panels decorative and low contrast. They should support recognition without competing with the title.
- Keep cards theme-consistent across owned sites by defining named card themes once per site, then assigning them through
GeneratedCardTheme,GeneratedCardThemesByCollection, ormeta.social_card_theme. - Prefer token changes over page front matter when a visual decision applies to a whole site or collection. Page-level overrides are for exceptions.
- Validate new card styles with at least one short homepage-style title, one long wrapped editorial title, and one docs/API/reference card before shipping a theme.
- For data-heavy cards, prefer one clear metric row over dense dashboards. If a layout needs charts, language bars, or repository-style callouts, add a reusable renderer layout/variant rather than embedding one-off SVG snippets in front matter.
Generated cards can also include a site/page logo and editorial inline media:
- logo source precedence:
meta.social_card_logo->meta.social.logo-> named generated card themeLogo->Social.GeneratedCardLogo->StructuredData.OrganizationLogo - inline media source precedence:
meta.social_card_image/meta.social.card_image/meta.social_card_media-> existing social image metadata -> first body image for editorial collections - editorial cards automatically switch to the
inline-imagelayout when inline media resolves successfully, unlessmeta.social_card_image_inline: false - SVG logo/media files are sanitized before raster rendering; scripts, event handlers, external references, and XML doctypes are rejected. Remote media fetches are opt-in and cached with bounded size/entry limits for the current build process.
Generated social-card values are resolved in this order:
- per-page
meta.social_card_*overrides - collection defaults from
Social.GeneratedCard*ByCollection - selected named generated-card theme defaults
- global
Social.GeneratedCardStyle/Social.GeneratedCardVariant/Social.GeneratedCard*site defaults - built-in heuristics (for example: home ->
spotlight, docs ->shelf, api ->reference, blog ->editorialorinline-image, contact ->connect)
If meta.social_image is not set, editorial posts (for example blog/news/changelog) also try to use:
- explicit image aliases such as
image,cover_image,thumbnail,og_image, ortwitter_image - then the first markdown or inline HTML image in the post body
- and only then fall back to generated/default site image. Pages can opt out using front matter:
meta.social: false
meta.structured_data: false
Structured-data profile metadata (per-page front matter):
# FAQPage: list items as "Question|Answer"
meta.faq.questions:
- "What does this tool do?|It automates release validation."
- "Can I run offline?|Yes, for local workflows."
# HowTo: list steps as "Step Name|Step text"
meta.howto.name: Publish Module
meta.howto.description: End-to-end release flow.
meta.howto.total_time: PT20M
meta.howto.tools:
- PowerShell 7
meta.howto.supplies:
- Repository access
meta.howto.steps:
- "Build|Run dotnet build."
- "Test|Run dotnet test."
# Product
meta.product.name: ExampleDocs Pro
meta.product.brand: Example
meta.product.sku: EX-PRO-01
meta.product.price: 49.99
meta.product.price_currency: USD
meta.product.rating_value: 4.8
meta.product.rating_count: 137
# SoftwareApplication
meta.software.name: ExampleDocs CLI
meta.software.application_category: DeveloperApplication
meta.software.operating_system: Windows, Linux, macOS
meta.software.version: 1.4.0
meta.software.download_url: /downloads/ix-cli
meta.software.price: 0
meta.software.price_currency: USD
News article profile behavior:
- if
StructuredData.NewsArticleistrue, collectionnewspages emitNewsArticleJSON-LD. - if both
ArticleandNewsArticleare enabled,NewsArticleis preferred for news pages, while non-news article-like pages still emitArticle.
Optional per-page social overrides:
meta.social_title: "Custom share title"
meta.social_description: "Custom share description"
meta.social_image: "/assets/social/custom-card.png"
meta.social_image_alt: "Card image alt text"
meta.social_image_width: 1200
meta.social_image_height: 630
meta.social_twitter_site: "@productx"
meta.social_twitter_creator: "@author"
meta.social_card_badge: "GUIDE"
meta.social_card_route: "/docs/getting-started"
meta.social_card_style: "docs"
meta.social_card_variant: "compact"
Image aliases also accepted as explicit social overrides: meta.image, meta.cover_image, meta.thumbnail, meta.og_image, meta.twitter_image.
Define snippet-style templates in site.json:
{
"Seo": {
"Enabled": true,
"Templates": {
"Title": "{title} | {site}",
"Description": "{title}: {description}"
}
}
}Collection-level override:
{
"Collections": [
{
"Name": "blog",
"Input": "content/blog",
"Output": "/blog",
"Seo": {
"Templates": {
"Title": "{title} ({date}) | {site}",
"Description": "{collection} update: {title}"
}
}
}
]
}Supported tokens:
{title}{site}{collection}{date}(yyyy-MM-dd){project}{lang}
Optional per-page overrides in front matter:
meta.seo_title: "Custom SEO title"
meta.seo_description: "Custom SEO description"Each build emits resolved SEO metadata at _powerforge/seo-preview.json.
Generated taxonomy term titles include the taxonomy name, such as Security | Tags,
so a category and a tag with the same name have distinct titles. Visible page titles
retain the term name. Paginated listings keep their landing-page SEO title and append
a language-neutral page count on later pages, such as Engineering journal | Example Site (2/3).
This suffix also applies when pagination copies a landing page's meta.seo_title override.
Use route-scoped crawl directives with optional bot-specific overrides:
{
"Seo": {
"CrawlPolicy": {
"Enabled": true,
"DefaultRobots": "index,follow",
"Bots": [
{ "Name": "googlebot", "Directives": "index,follow,max-image-preview:large" }
],
"Rules": [
{
"Name": "search-noindex",
"Match": "/search/*",
"MatchType": "wildcard",
"Robots": "noindex,follow",
"Bots": [
{ "Name": "googlebot", "Directives": "noindex,follow" }
]
}
]
}
}
}Rule behavior:
- first matching rule wins
- match types:
exact,prefix,wildcard - page-level overrides win over policy:
meta.robotsmeta.googlebot/meta.bingbot(ormeta.robots.googlebot)
Build output diagnostics:
_powerforge/crawl-policy.json(resolved directives per generated page)
Use structured head tags so themes don’t repeat favicons or preconnects.
{
"Head": {
"Links": [
{ "Rel": "icon", "Href": "/favicon.png", "Type": "image/png" },
{ "Rel": "apple-touch-icon", "Href": "/apple-touch-icon.png" },
{ "Rel": "preconnect", "Href": "https://img.shields.io", "Crossorigin": "anonymous" },
{ "Rel": "dns-prefetch", "Href": "https://img.shields.io" }
],
"Meta": [
{ "Name": "theme-color", "Content": "#0a0e14" }
]
}
}
Publish the app separately and overlay it under /playground/.
Use the app shortcode to link to it.
Define taxonomies (tags/categories) in site.json:
{
"Taxonomies": [
{ "Name": "tags", "BasePath": "/tags", "ListLayout": "taxonomy", "TermLayout": "term" }
]
}PowerForge.Web generates:
/tags/(taxonomy list)/tags/<term>/(term pages)
Use markdown-first image syntax and let PowerForge add sensible defaults on render:
- missing
loadingbecomeslazy - missing
decodingbecomesasync
You can tune or disable this in site.json:
{
"Markdown": {
"AutoImageHints": true,
"DefaultImageLoading": "lazy",
"DefaultImageDecoding": "async"
}
}Enable multiple outputs (HTML/JSON/RSS/Atom/JSON Feed) per page kind:
{
"Outputs": {
"Rules": [
{ "Kind": "section", "Formats": ["html", "rss", "atom", "jsonfeed"] },
{ "Kind": "page", "Formats": ["html", "json"] }
]
}
}Implicit defaults (when no explicit output rule/override exists):
- editorial section pages (
blog,news):html+rss tags/categoriestaxonomy and term pages:html+rss
Optional implicit feed formats:
{
"Feed": {
"IncludeAtom": true,
"IncludeJsonFeed": true
}
}This adds atom (index.atom.xml) and jsonfeed (index.feed.json) to implicit editorial/taxonomy outputs while keeping existing RSS defaults.
This gives zero-config feeds for common editorial/taxonomy layouts while keeping other page kinds HTML-only by default.
Versioning metadata can be stored in site.json and used in templates:
{
"Versioning": {
"Enabled": true,
"BasePath": "/docs",
"HubPath": "./data/version-hub.json",
"GenerateAliasRedirects": true,
"Current": "v2",
"LatestAliasPath": "/docs/latest/",
"LtsAliasPath": "/docs/lts/",
"Versions": [
{ "Name": "v2", "Label": "v2", "Url": "/docs/v2/", "Latest": true, "Aliases": ["stable"] },
{ "Name": "v1", "Label": "v1 (LTS)", "Url": "/docs/v1/", "Lts": true, "Deprecated": true, "Aliases": ["legacy"] }
]
}
}HubPath is optional. When set and Versions is empty, PowerForge loads versions from the generated version-hub.json.
This data is available under site.versioning in templates.
PowerForge also exposes a resolved runtime object under versioning (plus shortcuts current_version, latest_version, versions) with:
- normalized URLs
- resolved current version (from
Currentor current page path) - resolved
versioning.ltswhen any version is markedLts is_currentflags for each version entry
Recommended contract:
- mark exactly one version as
Default - mark exactly one version as
Latest - optionally mark one version as
Lts - keep
Currentaligned to a configuredName - use root-relative URLs (for example
/docs/v2/)
Redirect alias generation:
- when
GenerateAliasRedirectsis true, build output includes host redirect files for:- latest alias (default
<BasePath>/latest/unlessLatestAliasPathis set) - lts alias when any version has
Lts:true(default<BasePath>/lts/unlessLtsAliasPathis set) - per-version
Aliases(for example"stable"->/docs/stable/)
- latest alias (default
Enable link checking in site.json:
{
"LinkCheck": {
"Enabled": true,
"IncludeExternal": false,
"Skip": ["**/external/**"]
}
}Results are written to _powerforge/linkcheck.json.
Enable a simple markdown render cache:
{
"Cache": {
"Enabled": true,
"Root": ".cache/powerforge-web",
"Mode": "contenthash"
}
}You can override per page via front matter:
outputs:
- html
- json
- Markdown for most pages
- JSON data for repeated blocks
- Avoid HTML in markdown except for edge cases
- Keep layouts in themes, not in content
OwnedLinks enables network validation during audits of generated HTML. It is
independent of the build-time LinkCheck option and disabled by default, even
when domains are listed. Other external domains remain skipped.
{
"OwnedLinks": {
"Enabled": true,
"Domains": [
{ "Domain": "evotec.xyz", "SitemapUrl": "https://evotec.xyz/sitemap.xml" },
{ "Domain": "powerbginfo.com" }
],
"Severity": "error",
"TimeoutSeconds": 10,
"MaxDurationSeconds": 60,
"MaxSitemapBytes": 5242880,
"MaxSitemaps": 20,
"MaxLinkChecks": 100
}
}Domain is an exact hostname with an optional port, without a scheme or path.
List subdomains separately. SitemapUrl defaults to
https://{Domain}/sitemap.xml and must be HTTP(S) on that domain. At most 20
domains are accepted. Configuration and property names follow the usual
case-insensitive site loader; severity values are warning (default) or error.
The audit loads each referenced domain's sitemap once per audit invocation, using the shared sitemap parser. XML URL sets, indexes (including gzip files), and up to five levels of child indexes are supported. Each document is fetched at most once; cycles and duplicate child references are skipped. Cache entries are kept only for that invocation, including failures and HTTP fallback results.
Exact sitemap URL matches establish page presence. Fragments are ignored:
anchors on existing pages pass, but the remote element ID is not inspected.
Paths, case, locale prefixes, query strings, schemes, and ports retain their
meaning. Slash, index.html, and legacy-path variants use bounded HTTP GETs
with response headers only when absent from the sitemap. The audit follows up
to five redirects, only to configured owned domains. A successful response
accepts unlisted pages and downloads; only HTTP 404/410 is classified as broken.
Assets (href/src and srcset) use HTTP rather than sitemap membership.
An absolute HTTP(S) HTML <base> also resolves relative and protocol-relative
destinations for the enabled owned-domain check.
Sitemaps reduce network work for normal page links; they are not an exhaustive inventory or proof that a listed URL currently serves successfully. An absent entry alone never establishes a broken link. Soft 404 pages returning HTTP 200 and broken remote fragment IDs are outside this check's scope.
Unavailable/invalid sitemaps, blocked redirects, other HTTP statuses (including
403/429/5xx), timeouts, and exhausted budgets emit distinct owned-link unknown
warnings. A sitemap failure remains visible even if fallback requests succeed.
Unknown results never increment broken-link or missing-asset counts. Confirmed
404/410 findings use Severity; all findings participate in normal baselines,
suppressIssues, category/code gates, JSON summaries, and SARIF. For example,
PFAUDIT.OWNED-LINK suppresses the category; a URL substring can make an
exception narrower. Existing failOnWarnings/failOnNewIssues policy can still
fail a run containing unknown warnings.
Limits apply across the complete audit: TimeoutSeconds is 1–120 per request
(including sitemap body reads), MaxDurationSeconds is 1–600 for all network
work, MaxSitemapBytes is 1–52,428,800 per document (both transferred and expanded gzip data),
MaxSitemaps is 1–100, and MaxLinkChecks is 0–10,000 distinct fallback URLs.
HTTP response bodies for fallback probes are not downloaded. Only domains
actually referenced by selected HTML are fetched. checkLinks and checkAssets
continue to control their respective checks.
Pass this site configuration to audit or doctor. A pipeline audit does not
build the site when reading config:
{ "task": "audit", "config": "./site.json", "siteRoot": "./_site" }Standalone powerforge-web audit --config ./site.json retains its usual
build-then-audit behavior. doctor --config ./site.json --no-build audits
existing output. An audit without site configuration keeps the offline default.
Configured pipeline audits bypass the pipeline result cache, so each invocation
reevaluates live evidence.