bevel.json declares routes

bevel.json has routePattern or routeKey, which Bevel no longer reads.

  • Error
  • BEVEL030

What it means

Routes now live only at MapStatic in Program.cs. A dataset entry in bevel.json cannot carry them.

Example message

text
BevelPrebuild: error BEVEL030: BEVEL030: Dataset 'Posts' in bevel.json declares 'routePattern'/'routeKey', which are no longer supported. Routes now live only at the mapping site: app.MapStatic<TPage>("/pattern/{Token}", (ISiteData d) => d.Items) in Program.cs. Remove these properties from bevel.json and use ISiteLinks (Links.To<TPage>(...)) to build links. Help: https://khalidabuhakmeh.github.io/bevel/reference/diagnostics/bevel030/

How to fix

Delete routePattern and routeKey from bevel.json. Declare the route in Program.cs instead.

Program.cscsharp
app.MapStatic<PostPage>("/posts/{Slug}", (ISiteData d) => d.Posts);