Routing updates v0.4.0

The latest version of routing is available. And has some additional features
(up till now it’s mostly been bug fixes)

You can find docs here:
https://routing-docs.anvil.works/

v0.4.0 (10/07/25)

What’s Changed

:rocket: Features

  • feat: add client code prelude to import router module #79
  • feat: add configurable routes module for designer navigation support and automatic route import #78
  • feat: add sitemap.txt and robots.txt generation options, expose router.sorted_routes #63
  • feat: @hooks.before_load decorator for composable before_load hooks #74
  • feat: allow before_load to return partial nav_context dictionary #73

:bug: Bug Fixes

  • fix: decode URL paths before creating segments to handle already encoded urls #77
  • fix: used cached_context when opening a cached form #70
  • fix: pass keyword arguments and use super() in Route.init_subclass #69

:open_book: Documentation

  • docs: add meta method documentation for dynamic route meta tags #75
  • docs: add use_data API reference for shared route data access #72
  • Fix docs use of loader_args in load_data #66

Contributors

Thanks to all our contributors! :tada: @racersmith

Full Changelog: Comparing v0.3.5...v0.4.0 · anvil-works/routing · GitHub

6 Likes

Thank you @stucork and everyone who contributed!

Quick question…can the new routing system co-exist with Anvil-Extra’s Hash Routing?

I want to gradually transition parts of my app to the new route instead of all at once.

Thanks!

-Danny

Not really. Both routers want to control the browser’s history api. So I can’t see that ending well.

Love it, I use this routing component in all my projects, by default.

I need to do some more investigating on this new routing method, I’ve got heaps of pages/apps that use the older routing from anvil-extras which I’d love to move away from, but not sure if the effort of doing so is worth it though

1 Like