Changelog
What changed in each Bevel release, straight from the repository changelog.
On this page
This page shows the repository's CHANGELOG.md, rebuilt with every docs build. Bevel is pre-1.0, so APIs can change between minor versions. Read it before you upgrade.
0.3.0 (2026-11-29)
The documentation moved to a site built with Bevel: https://khalidabuhakmeh.github.io/bevel/. Building it drove the additions below.
Added
- Processor-reported diagnostics: a processor that takes
BevelLoadContextin its constructor (already in the build-time services; existing processor signatures are unchanged) can callReportWarning,ReportErrororReport(BevelSeverity, code, message, file, line, column)with its own code. They print aspath(line,col): warning CODE: messageindotnet build; any error fails the build after all datasets loaded, with every diagnostic listed. Prebuild prints MSBuild-format lines from processors verbatim. - Repo file access and input tracking:
BevelLoadContext.RepoRootPath(nearest.git, else.sln/.slnx;Bevel:RepoRootoverrides),@/repo-relative paths inResolvePath,ResolveRepoPath, andReadAllText/ReadTextAsync/FileExists, which register the file as a build input so editing it (or creating a missing one) reruns the incremental data step.RegisterInputFileaccepts@/paths and tracks a missing file through its directory. - Whole-dataset post-processing:
[PostProcess<T>]on a list dataset's item type runs anIDatasetProcessor<TItem>once after all items are loaded and processed (beforeOrderBy,[Unique]and groups), to resolve cross-references, build navigation or validate links. It can replace, filter and reorder items and report diagnostics. New codesBEVEL096(invalid post-processor type) andBEVEL097(post-processor failed, returned null, or used on a single-object dataset).[DependsOn]now also works on[DataSource]item types, so a post-processor can read other datasets withctx.Get<T>. - Post-export steps:
BevelOptions.AfterExport(async callbacks) andservices.AddBevelExportStep<TStep>()/AddBevelExportStep(callback)(IBevelExportStep) run after a successful export, with aBevelExportContext(OutputDirectory,PathBase,SiteUrl,Routes,Result,Services). A step that throws fails the export (non-zero exit with--bevel-build); cancellation passes through. Bevel ships no indexer: wire Pagefind or a link checker yourself. See After the export. BevelOptions.SiteUrl,ISiteLinks.AbsoluteUrl(url),MapSitemap(),MapRobots()andExcludeFromSitemap(): a sitemap of HTML routes (path base andSiteUrlapplied, optional<lastmod>) and arobots.txtwith aSitemap:line. See Site URL, sitemap and robots.BevelOptions.RewriteHtmlLinks(opt-in) andISiteLinks.RewriteHtmlLinks(html): prefix root-relativehref,src,srcset,actionandpostervalues in rendered HTML withPathBase, live and on export, so Markdown HTML works under a sub-path. Never double-prefixes; ignores absolute,//host,#fragment,mailto:and already-prefixed values. See Path base.BevelExportedFile.ContentType(also in.bevel-output.json): non-HTML routes such asMapStatic("/calendar.ics", ...)export their exact bytes, with the content type recorded.ISiteLinks.Route(route): links a single-route mapping that is not a page (Links.Route("/calendar.ics")), withPathBaseand output style, and throws (listing known routes) for an unknown route or one excluded from the export. The Conference sample uses it instead ofLinks.Asset.- Diagnostic help links: every
BEVELnnnmessage (prebuild output and runtime exceptions such asGroupException) ends withHelp: https://khalidabuhakmeh.github.io/bevel/reference/diagnostics/bevelnnn/, after the MSBuild prefix so lines still parse. MapSitemap(trailingSlash: true): lists directory-style URLs with a trailing slash (/about/) to match canonical URLs on hosts such as GitHub Pages. Ignored forFlatHtml.BevelOptions.ExcludeAssets: glob patterns (*.map,js/dev-*.html,dev/**, case-insensitive, matched against the output path) for files fromwwwroot/StaticAssetsPathand asset folders that the export should not copy or list in.bevel-output.json. Live serving is unchanged. Default: empty.- Pluggable data format readers: implement
IBevelFormatReader(Extensions,Read(BevelFormatSource)returning aJsonObjectorJsonArray) to load TOML, CSV or any text format through[DataSource("X", "./*.toml")]with binding, required members,[Unique],[Reference], processors, groups, globs, recursive folders and input tracking. Public classes inData/**/*.csregister themselves; packages callservices.AddBevelFormat<TReader>()fromIBevelDataStartup. JSON and YAML go through the same registry (replaceBuiltIn: truereplaces them;.md,.markdownand.xmlare fixed). ThrowBevelFormatException(message, line, column)for a bad file. New codesBEVEL098(unsupported extension, lists what Bevel can load),BEVEL099(format reader failed, with file and line) andBEVEL100(invalid or clashing registration). Bevel adds no TOML or CSV dependency. See Teach Bevel a new format.
Fixed
- Export mode (
--bevel-build) no longer prints the console lifetime messages ("Application started", "Application is shutting down..."): they appeared in the wrong order and added noise. - Static files were shadowed by page routes whose last segment is a bare parameter (e.g.
MapStatic<Page>("/{Section}/{Slug}")turned/css/site.cssinto a 404 underdotnet run): Unguarded Bevel endpoints now decline requests for files that exist in the web root (a matcher policy; endpoints with any access guard — authorization or a fallback policy, endpoint filters, CORS/rate-limiting/antiforgery metadata — always win over a file at the same URL; no static-file middleware is added or reordered, so app authorization on static files is unaffected) and the app's ownUseStaticFiles()serves them; its hiding file provider no longer treats an extension-bearing file under such a route as a Bevel-owned URL.
Changed
- The README (also the NuGet package readme) is now a short introduction that links to the documentation site. The long-form docs in
docs/*.mdmoved into the site.
0.2.0 (2026-11-29)
Added
Bevel.Templatespackage with twodotnet newtemplates:bevel(minimal site) andbevel-blog(Markdown blog with paging, RSS and a sitemap). Options:--site-title,--base-path(for sub-path hosting) and, forbevel-blog,--no-sample-content. Each template pins itsBevelreference to the template pack's version at pack time.eng/template-test.shinstalls the template pack into an isolated hive and builds and exports every template/option combination; it runs in CI and before a release.- Future: a GitHub Pages workflow option for the templates.
0.1.0 (2026-11-29)
First release. Bevel is pre-1.0, so APIs may change between minor versions.
Fixed
- Concurrent exports into sibling output directories no longer delete each other's live staging directory. Cleanup of leftover
.bevel-staging-*directories now relies on an owner record (process id, start time) in the marker file plus an in-process registry of live directories, not on file locks, and leaves a directory alone whenever its owner is alive or cannot be determined.
Changed
- Prebuild outputs are promoted as a consistent set:
BevelData.g.csis deleted before any snapshot changes and written last, so an interrupted prebuild always reruns. Snapshot resource names now carry a hash of the exact dataset name (Bevel.Data.<Namespace>.<Dataset>.<hash>.json) soPosts.Tags/Posts_Tagsor case-only differences cannot collide (BEVEL095if they still would). With no datasets, stale snapshots and generated files are removed. - Faster, leaner export (output byte-identical,
.bevel-output.jsonincluded): pages render in parallel (BevelOptions.ExportParallelism, defaultMath.Clamp(ProcessorCount / 2, 1, 8),1= sequential), each in its own scope; pages are hashed while written and existing files are hashed at most once;Links.To(...)no longer copies the registrations or runs LINQ on every call (cached per registry version; errors take the slow path so messages are unchanged). A stress site with 10,000 posts: export 27.4 s → 9 s, 1,000 posts 2.5 s → 0.74 s. Ordering change: all output path errors (duplicate path, containment, asset folder collisions) are now reported before any page renders, and when several pages fail, the error of the first failing route in route order is thrown. Page code and services must be thread-safe, or setExportParallelism = 1. See Export performance. - The publish export (
BevelExportOnPublish) runs the export child process withDOTNET_gcServer=0(unlessDOTNET_gcServeris already set), about 60% less peak memory at the same speed. The published site's GC is not changed. Fordotnet run -- --bevel-buildand CI, setDOTNET_gcServer=0yourself. - "No page '…' exists for …; known: …" now lists the known routes in ordinal order (it used to list the first eight of an unordered set).
- The sample caches nothing by Markdown text any more (a post page renders its body once and shares it with its table of contents) and looks up a post's archive month, category and tags through
IPostTaxonomy, a slug-keyed index built once, instead of scanning every group per card. - Faster, leaner data step (output byte-identical): each Markdown file is read, split and YAML-parsed once, with span-based front matter splitting and one shared YAML deserializer; snapshots are validated and written as UTF-8 bytes, one dataset at a time (staged, then moved into place only when they differ); per-type caches replace per-item reflection (
BEVEL092, processors, references); the prebuild tool runs withTieredPGOoff. A stress site with 10,000 posts: data step 7.7 s → 4.2 s, peak memory 1.9 GB → 1.4 GB.BEVEL051now matches only System.Text.Json's cycle/depth errors. The sample'sPostStatscounts words with a parse-onlyCountWordsinstead of rendering HTML.
Added
BevelOptions.AssetFolders(BevelAssetFolder(Source, RequestPath, params Patterns)): serve and export images and other files next to your content, only those matching the patterns. Served live with static-file middleware in every environment, copied on export and recorded in the manifest; collisions with pages, other assets orwwwrootfiles fail the export. The sample servesData/Posts/<slug>/how-it-works.svg. See Asset folders.BevelStatsandawait app.GetBevelStatsAsync(): datasets (kind, items, files, items removed per processor), build environment and duration, warnings, route counts and the last export.WriteTo(TextWriter)andToString()render a table.BevelOptions.LogStatslogs it at startup and after every export (also an explicitExportStaticSiteAsync()). Each dataset hasLoadTimeandProcessorTime(the table showsTime), and the header says when the build skipped the data step. The build records the numbers in a separate generatedBevelStats.g.cs, so timings never affectBevelData.g.cs; several data assemblies are merged per assembly. See Stats.BEVEL094: a[Reference]to the member's own dataset now fails with a specific error that recommends storing keys and looking items up at render time, instead of the genericBEVEL011.- The resolved build environment (
ASPNETCORE_ENVIRONMENT,DOTNET_ENVIRONMENT,BevelEnvironment) is now an input ofBevelPrebuild: changing it reruns the step. MSBuild resolves it once and passes it to the tool. BevelDataRegistrationAttribute.Environmentrecords the environment the data was built under. Exporting data built forDevelopmentlogs a warning. See Data built for Development.ProcessResult.Remove: a record processor can remove an item. Later processors do not run for it, and it is absent from data, groups and[Unique]. References to it fail naming the processor. Removing in a single-object dataset isBEVEL093. See Processors.BEVEL092also runs after record processors: a non-nullable reference member that is stillnullfails the build.- Incremental data step.
BevelPrebuildskips when its inputs are unchanged:Data/**, files a source read (including outsideData/),appsettings*.jsonandbevel.json.BevelPrebuildAlwaysRun=trueruns it every build, for loaders that read a database or API.dotnet watchrebuilds onData/content changes. BevelOptions.PathBaseandISiteLinks.Asset(path)for sites hosted under a sub-path. Export layout is unchanged. See Path base.BevelEndpointRegistry.GetRoutesAsyncandBevelRouteInfo(path, page or not, content type, exported or not, page type, item).GetAllRoutesAsyncis unchanged.**in data source paths (./**/*.md).index.mdbelow the root takes its folder name as slug.SourcePathis relative to the wildcard root.[Unique](IgnoreCaseoption) on a member of any list dataset: duplicates fail withBEVEL079, case-only differences warn withBEVEL089. New errorsBEVEL090andBEVEL091. See Unique values.- Export checks routes whose output paths differ only by case. On a case-insensitive output directory (probed on disk) the export fails before writing. On a case-sensitive one both files are written and a warning says they will collide on Windows and macOS.
- Processors:
[Process<T>(nameof(Source))]withIProcessor<TSource, TResult>for one member, and[Process<T>]on the record withIProcessor<TItem>for several. They run at build time with build-time services. DiagnosticsBEVEL081toBEVEL088. See Processors. - Grouping attributes that turn a property of a dataset item into a dataset of groups:
[GroupBy]for text,[GroupByDate]for dates,[GroupByFlag]forbool, and[GroupBy<TGrouper>]for any type through anIGrouper<TValue, TGroupValue>. See Groups. - Diagnostics
BEVEL060toBEVEL078for groups, andBEVEL077as a warning when text spellings with the same slug are merged.
Fixed
Export no longer holds every rendered page in memory. Pages are rendered into a
.bevel-staging-*directory next to the output directory and moved into place only after the whole export succeeded; a failure or cancellation deletes the staging directory and leaves existing output untouched. Output is byte-identical. See Atomic export.A registration without a registry no longer re-reads (and rebuilds) every Minimal API endpoint on each lookup; the result is memoized.
Export time grew far faster than content (1,000 posts took 10 minutes). Every
Links.To(...)during an export re-read the endpoint data sources, and ASP.NET Core rebuilds every Minimal API endpoint on each read. Bevel now reads its endpoints once and caches them (dropped when a mapping or data source is added, and at the start of every export so conventions added later, such as on a route group, are seen), snapshots the excluded routes once per export, and the sitemap helpers (GetRoutesAsync,GetAllRoutesAsync) and the Production fallback warning no longer rebuild endpoints per call or request.Markdown front matter delimiters may have trailing spaces or tabs, and the closing delimiter may end the file. Before, such a file silently lost its front matter.
RawMarkdownand front matter are always LF (files without front matter used to keep CRLF).File-name slugs (and
index.mdfolder slugs, andslug:values) are NFC-normalized, so they match across macOS and other systems. They are not lowercased.Recursive data source paths log each skipped symbolic link or reparse point as a build message. Hidden entries are still skipped silently (documented).
The prebuild step now sees your package references. The reference list was written before it existed, so it was always empty.
SDK 11: builds work. The "no component types" failure was the SDK 11.0.100 Razor generator losing the folder from namespaces when the project is reached through a symlinked path (macOS
/varto/private/var). It also happens without Bevel. Build from the real path. Aglobal.jsonpin is no longer needed.Prebuild honours the project's global usings,
LangVersion,NullableandDefineConstantswhen it compilesData/**/*.cs. Types from the SDK's implicit usings (IServiceCollection,IConfiguration) work in Data code without ausingdirective, and#ifblocks match the real build. Static and alias usings are supported. A using whose namespace prebuild cannot resolve (for example one declared outsideData/) is skipped and logged instead of failing the build.
Changed
- Routes made with
MapStatic(pattern, handler)(RSS, sitemaps, JSON) are now served from the export outside Development, like pages: verified bytes, recordedContent-Typeand status,ETag/304, live fallback with a warning. Previously the handler ran on every request. Filters, authorization, CORS and output caching still run first..ExcludeFromStaticExport()routes stay live. - Dataset snapshots are embedded as resources (
Bevel.Data.<Namespace>.<Dataset>.<hash>.json) instead of UTF-8 string literals inBevelData.g.cs. The generated C# no longer grows with content, so large sites compile with much less time and memory. Snapshot files are rewritten only when their content changes, so unchanged builds still skip compilation. - Breaking: missing required values are now a build error (
BEVEL092) for all dataset formats. Before, a missing non-nullable value becamenullordefault. Give the parameter a default value or make it nullable. Members Bevel fills,[Reference]and[Process]members are exempt. - The built-in Markdown slug collision check is gone.
BEVEL079now comes from[Unique]on the member you choose, with new message text. - Markdown slugs:
index.mdbelow a wildcard root now uses the folder name.SourcePathof nested files includes the sub-folder. - The sample renders Markdown with its own component, computes reading time with a processor, pages the home page with
mapFirstPageAtRoot, links groups withLinks.To(group)and builds its sitemap from route metadata. - A dataset that has groups is typed as
<Dataset>CollectiononISiteData, for examplePostsCollection. It is still anIReadOnlyList<T>and adds one property per group:data.Posts.Tags. - Group datasets are named
<Parent>.<Group>in the data graph. A loader that needs one writes[DependsOn("Posts.Tags")]andcontext.Get<IReadOnlyList<Group<BlogPost>>>("Posts.Tags"). [Reference]and grouping attributes on a positional record are found on every public constructor, not only when there is no parameterless one. An attribute declared both on a property and a constructor parameter now fails the build.
Breaking
IProcessor<TItem>.ProcessreturnsProcessResult<TItem>instead ofTItem.return post with { ... };still compiles (implicit conversion).IProcessor<TSource, TResult>is unchanged.DataSourceAttribute.IncludeDraftsand the built-indraft: truehandling are removed.draftis ordinary front matter now. Drop drafts with a processor (see the README).- Bevel no longer renders Markdown. Markdown datasets bind front matter plus
Slug,SourcePathandRawMarkdown(the body without front matter). Removed:Html,Excerpt,WordCount,ReadingMinutes,Headings, theMarkdownHeadingtype, and theMarkdownPipelineparameters onBevelLoaders.Markdown.*andBevelLoadContext.ReadMarkdown*. RenderRawMarkdownin your own component with Markdig, or compute values with a processor. A record that still declares those members fails withBEVEL080. - The Markdig dependency is removed from
Bevel. AddMarkdigto your project if you render Markdown. - Attributes you put on your data types drop the
Bevelprefix, like[GroupBy]:[BevelDataSource]is now[DataSource],[BevelReference]is[Reference],[BevelDependsOn]is[DependsOn],[BevelOrder]is[LoadOrder],[BevelDataSet]is[DataSet],[BevelModel]is[Model]and[BevelNoLayout]is[NoLayout]. TheOrderproperty on[DataSource]is nowLoadOrder. Rename them in your code. BevelSlug.Slugifyspells out#,+and&assharp,plusandand.C#wascand is nowc-sharp. Slugs built with it can change, and so can URLs that use them. Update links or add redirects. Markdown file-name slugs are unaffected. See Slugs.