😶🌫️ 4.0.0 – Caracas
Code debt, COVID and Kirby 3.6 rendered Retour 3 flawed and unmaintained for the last months.
So here we are for a new start...
What's new?
- Requires Kirby 3.6.1 and higher
More reliable
- Rewritten PHP architecture and restructured folder setup
- Unit tests for PHP backend with 95+% coverage
- It all runs on Fiber (introduced in Kirby 3.6)! Which helps to move a lot of the logic to PHP and make it testable
- Removed experimental frontend parts
- New script to generate sample data
- Code quality checks (via
psalmandphpmd) - Removed automatic updater for config and log files (see below how to upgrade manually)
- Uses
kirbyupinstead ofparcelfor bundling
Better
- Panel: plugin assets are down to 27 kb from 79 kb (e.g. via native charts, dropping chartist library)
- Panel: improved UI of redirect route dialogs
- Panel: navigation bar now sits below the charts to communicate clearer that they it also affects the tables' data
- Panel: timeline cuts off at current day/month (instead of falling to 0 in the coming day/month)
- Panel: highlight current hour/day/month on timeline axis
- Permalinks for the Panel view
- Backend: supports JSON for config files (set via
distantnative.retour.configoption) as (faster) alternative
{
"redirects": [
{
"from": "blog/(:all)",
"to": "notes/$1",
"status": 308,
"priority": false
},
{
"from": "team",
"to": "about/team",
"status": 307,
"priority": true
}
]
}- New
distant native.retour.siteoption to modify path prefix in Panel dialog - Supports PHP 8.1
Fixed
- Problems that caused redirect routes config getting wiped
- More stable dialog for adding/editing routes with distinct ways to cancel or save
- Fixed de-activating logs
- Fixed remembering pagination setting
- Fixed adding fail as redirect route
Missing
To increase reliability, I had to drop a few features from previous versions (for now):
- Removed page picker from redirect route dialog
- Removed calendar/date-range dropdown
- Support for PHP 7.3
How to upgrade?
As always: Please make a backup before updating anything!
- Rename your config file to
site/config/retour.yml
if you have not set your custom location viadistantnative.retour.config. - Update your config file
Array of redirect routes needs to be moved insideredirectskey.
redirects:
-
from: blog/(:all)
to: notes/$1
status: 301
priority: false
comment: null
-
from: team
to: about/team
status: 307
priority: true
comment: nullIf you want to switch to using JSON for the config file, rename your file to site/config/retour.json, convert the file content via an online tool and set the config option:
'distantnative.retour.config' => __DIR__ . '/retour.json'