Matteo Tosi

👋 hello fellow humans

Cockpit CMS: three add-ons hit packagist.org

Devlog: 2021-01

On January 11 I started cockpit-blog, a simple blog with a router, initially based on a Cockpit tutorial. Building it sent me digging into Cockpit CMS itself.

The first thing I found was a typo: CSRF tokens were spelled "csfr". A global rename got merged on January 17. The rest stayed open: routing for PHP's built-in server (/install returned a 404), a cleaner Forms submit, simple PHPUnit tests and delegated form validation. I also asked about an unused $mailer property and whether to drop __mailsubject.

On January 29 I published three on Packagist: Extended Forms (file uploads, form lifecycle changes), Honeypot (a hidden field that keeps unwanted submissions out of saved entries) and Native Lazy Loading (loading="lazy" on editor images). All target Cockpit 0.11.2.

Installing third-party add-ons with Composer was the next itch. On CockpitCMS-BetterSlugs I sent Composer installation, merged January 30, then a fix for the plugin folder name I got wrong. Oops.

Maps didn't stop: leaflet-elevation got an autofitBounds option.

Illustration of leaflet-elevation

An illustration of leaflet-elevation.

Pilot ID · SWE

Software Engineer @ g3w-suite

Over a decade fighting enterprise maps. Day job: getting QGIS projects to fly on the web.

Station
g3w-suite · client, server, Docker, plugins
On board since
2012
Side missions
Leaflet plugins, brownfield code
Motto
Peace, love, and lean code.

Callsign · Raruto

This is Raruto.

Just another human in the loop. The helmet does most of the work.

Callsign
Raruto
Name
Matteo Tosi
Home base
github.com/Raruto
Flight log
Debriefs →

Stencil · 01

No step

On a real airframe it marks the panels your boot would punch through. Here it marks the parts held together with duct tape. Tread lightly.

Stencil · 02

Mach 3+ inside

SR-71 cruise speed. This site gets close by shipping almost nothing: plain HTML, one stylesheet, no framework.

Mach 3
Not included.

Stencil · 04

Open hatch

Most of my open-source mileage is Leaflet plugins. Maps that rotate, draw elevation profiles, and lately go 3D.

Hangar
42 airframes →

Stencil · 03

Rust free

No theme, no page builder. Markdown in, HTML out, one small Node script in between. Hand-rolled HTML, like it's 1999.

Source
Raruto/raruto.github.io

Stencil · 05

Best viewed @ 85,000 ft

Roughly where the SR-71 cruised. Down here, any browser from this decade will do.

Ground crew

GitHub Pages

The runway. Markdown in, HTML out, one small Node script in between, pushed to a repo and served from there. No servers to babysit.

Source
Raruto/raruto.github.io
Service
pages.github.com