All notable changes to Proton are documented in this file.
- Asset helper functions (
stylesheet(),stylesheetAsync(),script()) no longer include SRIintegrityattributes by default. Passtrueas the second argument to opt in.
- Batch pages now recompute all
page.*metadata per item. Previously, fields liketitle,outputPath,filename, andisIndexleaked from the template page instead of being derived from each batch key. - Custom frontmatter fields (e.g.,
nav_group) are now preserved through batch processing. Previously, recomputing metadata discarded all non-computed frontmatter. - Batch pages with an
indexkey no longer produce a double-indexed output path (index/index.html).
- Rich page metadata: every page now exposes
page.canonical,page.path,page.outputPath,page.depth,page.isIndex,page.parent, andpage.slugin templates and layouts. - Pages collection (
proton.pages) now includes all page metadata fields for full parity with per-pagepage.*variables. - New "Page Variables" reference section in the data documentation with a complete table of all
page.*variables and usage examples.
- Moved
buildUrl()fromPageCollectiontoPage, centralizing all page metadata computation in a singlePage::computeMetadata()method shared by bothPageandPageCollection.
- Index page detection now uses exact filename match (
index) instead of substring matching. Previously, pages likereindex.htmlwere incorrectly treated as index pages in both URL generation and output path building.
- Asset helper Twig functions:
stylesheet(),stylesheetAsync(), andscript()generate complete HTML tags with cache-busting query strings and SRIintegrityattributes. - Lower-level
file_hash()andfile_integrity()Twig functions for custom asset tags. stylesheetAsync()uses themedia="print"pattern with a<noscript>fallback for non-render-blocking CSS loading.- Sitemap now includes
<lastmod>dates based on output file modification times. - Build summary printed after each build showing page count, asset count, output size, and elapsed time.
- Build order: assets are now copied and
npmBuildruns before page compilation. This allows asset helper functions to hash files generated by NPM build tools. AssetManager::copyAssets()now returns the count of copied assets.
- No longer crash when
src/macrosorsrc/partialsdirectories don't exist in a project.
- Asset copying now includes dot files (e.g.,
.htaccess). Previously all dot-prefixed files were skipped. - Sitemap URLs now use clean paths, stripping
index.html,index.htm, andindex.phpsuffixes.
- Extracted
FrontMatterParserutility class, consolidating duplicated YAML front matter parsing fromPage,PageCollection, andPageManagerinto a single location. - Extracted
PageWriter::TEMPLATE_EXTENSIONSconstant, shared withPageCollection, eliminating duplicated extension resolution logic.
- Expanded test suite from 225 to 232 tests covering front matter edge cases, draft filtering variations, watcher change processing, data loading errors, and page writer path building.
- Build-time syntax highlighting for fenced code blocks in Markdown using Tempest Highlight. Supports PHP, JavaScript, HTML, CSS, Twig, YAML, JSON, SQL, Python, and more.
- Draft pages: add
draft: trueto front matter to exclude a page from the build output, sitemap, andproton.pagesin non-development environments.
- Build configuration fix.
- Pages collection (
proton.pages) providing metadata for all pages, enabling dynamic navigation without hardcoding links. toc()Twig function that returns H2 headings extracted from the current page's Markdown content for on-page navigation.- New documentation site structure with front matter metadata (
nav_group,nav_order).
- Homebrew tap for installation (
brew install foundation/proton/proton). - Auto-update Homebrew tap on release.
- Updated installation docs to recommend Homebrew as the default method.
- JSON data file support (
.json) alongside YAML. - Configurable dev server port via
portsetting. - Verbose (
-v) and quiet (-q) CLI output modes for the build command. - Architecture tests and final Settings DTOs.
- Auto-generated GitHub Release notes in release script.
- Moved docs to foundationcss.com/proton.
- New
Configclass with better error handling and dependency injection. - Code quality improvements: PHPStan fixes, PHP tooling setup, dead code removal.
- Cache busting via
proton.build_timevariable for asset URLs.
- Raw mode now correctly preserves the
extendstag when wrapping content inverbatim.
raw: truefront matter option for pages containing literal template syntax (e.g., documentation about Twig).
- Build process fixes.