New Features
11 new additions
-
Google Analytics (gtag) — new
analyticsconfig section inconfig/site.ts. Setenabled: trueand add your GA4 measurement ID to load the gtag script withafterInteractivestrategy. No tracking code is loaded when disabled -
SEO configuration — new
seoconfig section for site-wide Open Graph and Twitter Card defaults. ConfigureogImage(default OG image path),twitterHandle, andtwitterCardTypein one place -
Open Graph meta tags — every page now generates
og:title,og:description,og:url,og:type, andog:imagetags. Blog posts withcoverImagefrontmatter use that image for OG previews -
Twitter Card meta tags —
twitter:card,twitter:title,twitter:description,twitter:creator, andtwitter:imageare generated from theseoconfig -
JSON-LD structured data —
WebSiteschema on the root layout andArticleschema on every doc page with headline, description, URL, and dateModified from thelast_updatefrontmatter field -
Sitemap generation — new
build-sitemap.jsscript generatespublic/sitemap.xmlat build time with all doc, blog, and release note URLs. Includeslastmod,changefreq, andpriorityvalues. Respectsblog.enabledandreleaseNotes.enabledflags -
robots.txt generation — the sitemap script also generates
public/robots.txtpointing to the sitemap URL -
Keywords meta tag — the
keywordsfrontmatter array is now rendered as<meta name="keywords">in addition to powering search indexing -
Migration: sidebar_position ordering — the Docusaurus migration script now reads
sidebar_positionandsidebar_labelfrom source frontmatter and_category_.jsonfiles before stripping them. The generated sidebar respects the original page order instead of falling back to alphabetical sorting -
Migration: automatic component copy — the migration script now copies custom components from
src/components/tocomponents/custom/migrated/, renames.jsx→.tsx/.js→.ts, rewrites@theme/*and@site/*imports, and registers copied components incomponents/docs/mdx/index.tsx. Components with Trellis built-in equivalents (Tabs, CodeBlock, Admonition, FlippingCard, Glossary, Feedback, etc.) are skipped automatically -
Migration: static asset copy — the migration script now copies the Docusaurus
static/directory intopublic/, so image references like/img/screenshot.pngcontinue to work without changes
Improvements
2 enhancements
-
Canonical URLs on all pages — doc, blog, and release note pages now always include a
<link rel="canonical">tag, not just when i18n is enabled -
metadataBaseset in root layout — Next.js resolves relative OG image paths correctly using theurlfromconfig/site.ts
Bug Fixes
4 issues resolved
-
Migration: HTML comments inside code blocks — the Docusaurus migration script now uses line-by-line fence tracking instead of a regex split, correctly preserving HTML comments inside fenced code blocks (including
~~~, 4+ backtick fences, and indented fences) instead of converting them to MDX comments and breaking the build -
Migration: autogenerated sidebar inside categories — when a Docusaurus category contained an
autogenerateddirective, the converted items were nested as an array instead of being flattened, producing invalid sidebar entries that crashed the build -
Migration: missing sidebar types — the generated
SidebarItemtype definition now includeslink,api, andhtmlvariants, matching the full type union expected bylib/sidebar.ts -
Sidebar null guard —
resolveSidebar()now gracefully skips undefined or malformed items instead of crashing with "Cannot read properties of undefined"