Uai

contentarticle-page.tsx

Color theme

block · 79/108

Article Page

Long-form reading with metadata, text size controls, sharing, and related articles.

Install

Install manuallyView source on GitHub

Composes

  • article-page.tsx18
  • author-card.tsx2
  • share-menu.tsx6

Accessibility4 checks

  • The page is an article named by its h1 title. Related reading is a complementary region named by its h2.
  • Text size is an APG radio group: one tab stop, arrow keys, Home, and End move and select. Each option has a spoken name.
  • Sharing is a Share Menu: a menu button with arrow-key navigation, Escape to close, and a status message after copying.
  • Reading size changes the type in the content only, so the layout and controls stay where readers left them.
canvasvariant="centered"content
Content and community

Engineering · Build performance

How we cut cold builds from 41 seconds to 9

Kiln 4.2 caches parsed templates on disk and skips image work that has not changed. Here is what we measured, what we threw away, and what is still slow.

Ines Moreau

8 min read

A cold build is the first build after cloning a site or clearing the cache. For a 2,400-page documentation site, Kiln 4.1 spent 41 seconds there, and most of it was work we had already done on the previous machine.

Where the time went

Profiling twelve large sites showed the same shape: 58% of the time parsing templates, 27% resizing images, and the rest writing files. Template parsing was the surprise. The same 140 partials were parsed again for every page that used them.

We assumed images were the problem because they were the loudest part of the log.

What changed in 4.2

  • Parsed templates are stored in the cache, keyed by their content hash.
  • Images are only resized when the source or the requested size changes.
  • Pages write in parallel, up to the number of available cores.

On the same site, a cold build now takes 9 seconds and a warm build takes under 2. Read the cache guide to share the cache between CI runs.

article page layout

Code example

usage.tsx
"use client";import {  ArticlePage,  ArticlePageAuthor,  ArticlePageCategory,  ArticlePageContent,  ArticlePageDescription,  ArticlePageDetails,  ArticlePageHeader,  ArticlePageMeta,  ArticlePageRelated,  ArticlePageRelatedItem,  ArticlePageRelatedList,  ArticlePageRelatedMeta,  ArticlePageRelatedTitle,  ArticlePageShare,  ArticlePageTextSizeControl,  ArticlePageTextSizeOption,  ArticlePageTitle,  ArticlePageToolbar,  type ArticlePageVariant,} from "@/components/uai/article-page";import { AuthorCardAvatar, AuthorCardName } from "@/components/ui/uai/author-card";import {  ShareMenuChannel,  ShareMenuContent,  ShareMenuCopy,  ShareMenuNative,  ShareMenuSeparator,  ShareMenuTrigger,} from "@/components/ui/uai/share-menu";export function ArticlePagePreview({ variant = "centered" }: { variant?: ArticlePageVariant }) {  return (    <ArticlePage variant={variant}>      <ArticlePageHeader>        <ArticlePageCategory>Engineering · Build performance</ArticlePageCategory>        <ArticlePageTitle>How we cut cold builds from 41 seconds to 9</ArticlePageTitle>        <ArticlePageDescription>          Kiln 4.2 caches parsed templates on disk and skips image work that has not changed. Here          is what we measured, what we threw away, and what is still slow.        </ArticlePageDescription>        <ArticlePageMeta>          <ArticlePageAuthor>            <AuthorCardAvatar name="Ines Moreau" />            <AuthorCardName>Ines Moreau</AuthorCardName>            <ArticlePageDetails>              <time dateTime="2026-09-24">September 24, 2026</time>              <span aria-hidden="true">·</span>              <span>8 min read</span>            </ArticlePageDetails>          </ArticlePageAuthor>          <ArticlePageToolbar>            <ArticlePageTextSizeControl>              <ArticlePageTextSizeOption value="small" aria-label="Small text">                A              </ArticlePageTextSizeOption>              <ArticlePageTextSizeOption value="default" aria-label="Default text">                A              </ArticlePageTextSizeOption>              <ArticlePageTextSizeOption value="large" aria-label="Large text">                A              </ArticlePageTextSizeOption>            </ArticlePageTextSizeControl>            <ArticlePageShare              url="https://kiln.example/blog/cold-builds"              shareTitle="How we cut cold builds from 41 seconds to 9"            >              <ShareMenuTrigger />              <ShareMenuContent align="end">                <ShareMenuCopy />                <ShareMenuNative />                <ShareMenuSeparator />                <ShareMenuChannel href="https://mastodon.example/share?url=https%3A%2F%2Fkiln.example%2Fblog%2Fcold-builds">                  Mastodon                </ShareMenuChannel>                <ShareMenuChannel href="mailto:?subject=Kiln%20cold%20builds&body=https%3A%2F%2Fkiln.example%2Fblog%2Fcold-builds">                  Email                </ShareMenuChannel>              </ShareMenuContent>            </ArticlePageShare>          </ArticlePageToolbar>        </ArticlePageMeta>      </ArticlePageHeader>      <ArticlePageContent>        <p>          A cold build is the first build after cloning a site or clearing the cache. For a          2,400-page documentation site, Kiln 4.1 spent 41 seconds there, and most of it was work we          had already done on the previous machine.        </p>        <h2>Where the time went</h2>        <p>          Profiling twelve large sites showed the same shape: 58% of the time parsing templates, 27%          resizing images, and the rest writing files. Template parsing was the surprise. The same          140 partials were parsed again for every page that used them.        </p>        <blockquote>          We assumed images were the problem because they were the loudest part of the log.        </blockquote>        <h2>What changed in 4.2</h2>        <ul>          <li>Parsed templates are stored in the cache, keyed by their content hash.</li>          <li>Images are only resized when the source or the requested size changes.</li>          <li>Pages write in parallel, up to the number of available cores.</li>        </ul>        <p>          On the same site, a cold build now takes 9 seconds and a warm build takes under 2. Read          the <a href="#cache-guide">cache guide</a> to share the cache between CI runs.        </p>      </ArticlePageContent>      <ArticlePageRelated>        <ArticlePageRelatedTitle>Related reading</ArticlePageRelatedTitle>        <ArticlePageRelatedList>          <ArticlePageRelatedItem href="#incremental">            Incremental builds, explained            <ArticlePageRelatedMeta>6 min read</ArticlePageRelatedMeta>          </ArticlePageRelatedItem>          <ArticlePageRelatedItem href="#ci-cache">            Sharing the build cache in CI            <ArticlePageRelatedMeta>4 min read</ArticlePageRelatedMeta>          </ArticlePageRelatedItem>          <ArticlePageRelatedItem href="#release-4-2">            Kiln 4.2 release notes            <ArticlePageRelatedMeta>Changelog</ArticlePageRelatedMeta>          </ArticlePageRelatedItem>        </ArticlePageRelatedList>      </ArticlePageRelated>    </ArticlePage>  );}

Manual installation

article-page.tsx

Loading component source…

esc
ThinkingAI
MessageAI
CitationAI
AttachmentAI
Tool CallAI
Response StatusAI
Run SummaryAI
Conversation ThreadAI · Block
Research SessionAI · Block
File AnalysisAI · Block
Agent RunAI · Block
Approval CardFeedback
Empty StateFeedback
Status BannerFeedback
Progress SummaryFeedback
Inline FeedbackFeedback
Confirmation DialogFeedback
Activity TimelineFeedback
Skeleton GroupFeedback
Prompt ComposerForms
Form FieldForms
Search FieldForms
Filter BarForms
File UploadForms
Date Range PickerForms
Form Error SummaryForms
Unsaved Changes BarForms
Step IndicatorForms
Task ListData Display
Data Table ToolbarData Display
Metric CardData Display
Description ListData Display
Comparison TableData Display
Kanban BoardData Display
Calendar ViewData Display
Audit LogData Display
App HeaderNavigation
App SidebarNavigation
Breadcrumb TrailNavigation
Page TabsNavigation
Command MenuNavigation
Split PaneNavigation
Sign-in CardAuthentication
Sign-up CardAuthentication
Password RecoveryAuthentication
Code VerificationAuthentication · Block
Onboarding WizardAuthentication · Block
Workspace SetupAuthentication · Block
Coupon FieldCommerce
Quantity PickerCommerce
Cart ItemCommerce
Price SummaryCommerce
Order StatusCommerce
Product DetailCommerce · Block
Product ListingCommerce · Block
Cart DrawerCommerce · Block
CheckoutCommerce · Block
Order TrackingCommerce · Block
Subscription ManagementCommerce · Block
Announcement BarMarketing
Pricing ToggleMarketing
Testimonial CardMarketing
Product GalleryMarketing
Trust PanelMarketing
Newsletter FormMarketing
Hero SectionMarketing · Block
Feature ShowcaseMarketing · Block
Pricing SectionMarketing · Block
Testimonials SectionMarketing · Block
FAQ SectionMarketing · Block
Call to ActionMarketing · Block
Waitlist SectionMarketing · Block
Contact SectionMarketing · Block
Author CardContent
CommentContent
Reaction BarContent
Share MenuContent
Changelog EntryContent
Article PageContent · Block
Documentation PageContent · Block
Changelog PageContent · Block
Comment ThreadContent · Block
Community FeedContent · Block
Public ProfileContent · Block
Map FrameMaps
Map ControlsMaps
Map MarkerMaps
Map LegendMaps
Place CardMaps
Route SummaryMaps
Dashboard ShellApplication · Block
Settings PageApplication · Block
Profile PageApplication · Block
Team ManagementApplication · Block
Notification CenterApplication · Block
Billing PortalApplication · Block
Search ResultsApplication · Block
Resource ManagerOperations · Block
Data ExplorerOperations · Block
Import WorkflowOperations · Block
Approval QueueOperations · Block
Audit Log ViewerOperations · Block
Incident DashboardOperations · Block
Report BuilderOperations · Block
Document FieldBrazil
CEP FieldBrazil
Pix PaymentBrazil
Installment PickerBrazil