Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Best of both worlds

Latest
Compare
Choose a tag to compare
@aral aral released this 25 Apr 18:42
· 76 commits to master since this release
20210425193402

Breaking change

  • If you have an advanced routes file (routes.js) it is loaded prior to any DotJS routes. Previously, the presence of a advanced routes file meant that routes were only loaded from it and that any DotJS routes, if they existed, were ignored. This change means you can use DotJS in your sites and (instead of or), when you need to, define some of your routes using the full expressiveness of Express routes.

    Although this is a breaking change in that it changes behaviour, the practical impact on existing sites should be minimal given that a project that was using advanced routing would not have had DotJS routes. The only place where this might impact you is if you forgot to delete some old DotJS routes and get surprised when they’re added to your application.

Added

  • In advanced routes (in routes.js) you now have access to the Site.js class (app.Site) and Site.js instance (app.site) through the Express app instance.

  • In the statistics view, any routes that begin with /admin/… are shown as ‘Administration page’ to hide any cryptographically-secure paths that may be used as per convention.