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 BevelLoadContext in its constructor (already in the build-time services; existing processor signatures are unchanged) can call ReportWarning, ReportError or Report(BevelSeverity, code, message, file, line, column) with its own code. They print as path(line,col): warning CODE: message in dotnet 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:RepoRoot overrides), @/ repo-relative paths in ResolvePath, ResolveRepoPath, and ReadAllText / ReadTextAsync / FileExists, which register the file as a build input so editing it (or creating a missing one) reruns the incremental data step. RegisterInputFile accepts @/ paths and tracks a missing file through its directory.
  • Whole-dataset post-processing: [PostProcess<T>] on a list dataset's item type runs an IDatasetProcessor<TItem> once after all items are loaded and processed (before OrderBy, [Unique] and groups), to resolve cross-references, build navigation or validate links. It can replace, filter and reorder items and report diagnostics. New codes BEVEL096 (invalid post-processor type) and BEVEL097 (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 with ctx.Get<T>.
  • Post-export steps: BevelOptions.AfterExport (async callbacks) and services.AddBevelExportStep<TStep>() / AddBevelExportStep(callback) (IBevelExportStep) run after a successful export, with a BevelExportContext (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() and ExcludeFromSitemap(): a sitemap of HTML routes (path base and SiteUrl applied, optional <lastmod>) and a robots.txt with a Sitemap: line. See Site URL, sitemap and robots.
  • BevelOptions.RewriteHtmlLinks (opt-in) and ISiteLinks.RewriteHtmlLinks(html): prefix root-relative href, src, srcset, action and poster values in rendered HTML with PathBase, 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 as MapStatic("/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")), with PathBase and output style, and throws (listing known routes) for an unknown route or one excluded from the export. The Conference sample uses it instead of Links.Asset.
  • Diagnostic help links: every BEVELnnn message (prebuild output and runtime exceptions such as GroupException) ends with Help: 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 for FlatHtml.
  • BevelOptions.ExcludeAssets: glob patterns (*.map, js/dev-*.html, dev/**, case-insensitive, matched against the output path) for files from wwwroot/StaticAssetsPath and 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 a JsonObject or JsonArray) 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 in Data/**/*.cs register themselves; packages call services.AddBevelFormat<TReader>() from IBevelDataStartup. JSON and YAML go through the same registry (replaceBuiltIn: true replaces them; .md, .markdown and .xml are fixed). Throw BevelFormatException(message, line, column) for a bad file. New codes BEVEL098 (unsupported extension, lists what Bevel can load), BEVEL099 (format reader failed, with file and line) and BEVEL100 (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.css into a 404 under dotnet 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 own UseStaticFiles() 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/*.md moved into the site.

0.2.0 (2026-11-29)

Added

  • Bevel.Templates package with two dotnet new templates: bevel (minimal site) and bevel-blog (Markdown blog with paging, RSS and a sitemap). Options: --site-title, --base-path (for sub-path hosting) and, for bevel-blog, --no-sample-content. Each template pins its Bevel reference to the template pack's version at pack time.
  • eng/template-test.sh installs 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.cs is 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) so Posts.Tags / Posts_Tags or case-only differences cannot collide (BEVEL095 if they still would). With no datasets, stale snapshots and generated files are removed.
  • Faster, leaner export (output byte-identical, .bevel-output.json included): pages render in parallel (BevelOptions.ExportParallelism, default Math.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 set ExportParallelism = 1. See Export performance.
  • The publish export (BevelExportOnPublish) runs the export child process with DOTNET_gcServer=0 (unless DOTNET_gcServer is already set), about 60% less peak memory at the same speed. The published site's GC is not changed. For dotnet run -- --bevel-build and CI, set DOTNET_gcServer=0 yourself.
  • "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 with TieredPGO off. A stress site with 10,000 posts: data step 7.7 s → 4.2 s, peak memory 1.9 GB → 1.4 GB. BEVEL051 now matches only System.Text.Json's cycle/depth errors. The sample's PostStats counts words with a parse-only CountWords instead 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 or wwwroot files fail the export. The sample serves Data/Posts/<slug>/how-it-works.svg. See Asset folders.
  • BevelStats and await app.GetBevelStatsAsync(): datasets (kind, items, files, items removed per processor), build environment and duration, warnings, route counts and the last export. WriteTo(TextWriter) and ToString() render a table. BevelOptions.LogStats logs it at startup and after every export (also an explicit ExportStaticSiteAsync()). Each dataset has LoadTime and ProcessorTime (the table shows Time), and the header says when the build skipped the data step. The build records the numbers in a separate generated BevelStats.g.cs, so timings never affect BevelData.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 generic BEVEL011.
  • The resolved build environment (ASPNETCORE_ENVIRONMENT, DOTNET_ENVIRONMENT, BevelEnvironment) is now an input of BevelPrebuild: changing it reruns the step. MSBuild resolves it once and passes it to the tool.
  • BevelDataRegistrationAttribute.Environment records the environment the data was built under. Exporting data built for Development logs 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 is BEVEL093. See Processors.
  • BEVEL092 also runs after record processors: a non-nullable reference member that is still null fails the build.
  • Incremental data step. BevelPrebuild skips when its inputs are unchanged: Data/**, files a source read (including outside Data/), appsettings*.json and bevel.json. BevelPrebuildAlwaysRun=true runs it every build, for loaders that read a database or API. dotnet watch rebuilds on Data/ content changes.
  • BevelOptions.PathBase and ISiteLinks.Asset(path) for sites hosted under a sub-path. Export layout is unchanged. See Path base.
  • BevelEndpointRegistry.GetRoutesAsync and BevelRouteInfo (path, page or not, content type, exported or not, page type, item). GetAllRoutesAsync is unchanged.
  • ** in data source paths (./**/*.md). index.md below the root takes its folder name as slug. SourcePath is relative to the wildcard root.
  • [Unique] (IgnoreCase option) on a member of any list dataset: duplicates fail with BEVEL079, case-only differences warn with BEVEL089. New errors BEVEL090 and BEVEL091. 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))] with IProcessor<TSource, TResult> for one member, and [Process<T>] on the record with IProcessor<TItem> for several. They run at build time with build-time services. Diagnostics BEVEL081 to BEVEL088. See Processors.
  • Grouping attributes that turn a property of a dataset item into a dataset of groups: [GroupBy] for text, [GroupByDate] for dates, [GroupByFlag] for bool, and [GroupBy<TGrouper>] for any type through an IGrouper<TValue, TGroupValue>. See Groups.
  • Diagnostics BEVEL060 to BEVEL078 for groups, and BEVEL077 as 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.

  • RawMarkdown and front matter are always LF (files without front matter used to keep CRLF).

  • File-name slugs (and index.md folder slugs, and slug: 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 /var to /private/var). It also happens without Bevel. Build from the real path. A global.json pin is no longer needed.

  • Prebuild honours the project's global usings, LangVersion, Nullable and DefineConstants when it compiles Data/**/*.cs. Types from the SDK's implicit usings (IServiceCollection, IConfiguration) work in Data code without a using directive, and #if blocks match the real build. Static and alias usings are supported. A using whose namespace prebuild cannot resolve (for example one declared outside Data/) 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, recorded Content-Type and 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 in BevelData.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 became null or default. 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. BEVEL079 now comes from [Unique] on the member you choose, with new message text.
  • Markdown slugs: index.md below a wildcard root now uses the folder name. SourcePath of 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 with Links.To(group) and builds its sitemap from route metadata.
  • A dataset that has groups is typed as <Dataset>Collection on ISiteData, for example PostsCollection. It is still an IReadOnlyList<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")] and context.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>.Process returns ProcessResult<TItem> instead of TItem. return post with { ... }; still compiles (implicit conversion). IProcessor<TSource, TResult> is unchanged.
  • DataSourceAttribute.IncludeDrafts and the built-in draft: true handling are removed. draft is ordinary front matter now. Drop drafts with a processor (see the README).
  • Bevel no longer renders Markdown. Markdown datasets bind front matter plus Slug, SourcePath and RawMarkdown (the body without front matter). Removed: Html, Excerpt, WordCount, ReadingMinutes, Headings, the MarkdownHeading type, and the MarkdownPipeline parameters on BevelLoaders.Markdown.* and BevelLoadContext.ReadMarkdown*. Render RawMarkdown in your own component with Markdig, or compute values with a processor. A record that still declares those members fails with BEVEL080.
  • The Markdig dependency is removed from Bevel. Add Markdig to your project if you render Markdown.
  • Attributes you put on your data types drop the Bevel prefix, 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]. The Order property on [DataSource] is now LoadOrder. Rename them in your code.
  • BevelSlug.Slugify spells out #, + and & as sharp, plus and and. C# was c and is now c-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.