BlazeOrange.ninja

Porting to Pico CMS

I was fooling around in Nextcloud and ran across Pico CMS. I already use it for storing my drafts so I reckoned if I could combine the two, I could save myself a few minutes per article and a lot of typoed links. So I tested it out locally (so I didn't have to FTP a bunch of stuff around and...not bad. Not great, but the issues shouldn't block adoption.

Maybe I haven't learned how to do what I want "the right way". Maybe what I want it to do will never happen. This is just my experience from messing with it for an evening.

Theming

Theming is more difficult than it needs to be. You can copy the default theme within Nextcloud but you can't edit it within Nextcloud. You have to go into the filesystem to a randomly named appdata folder. This is a real problem for people with a managed Nextcloud as they might not be able to access the folder themselves.

Why can't these files be accessible within Nextcloud? It could be an admin-only location. Or maybe Pico CMS could have its own user? There's got to be a better way to handle this.

Making a theme is easy up until you get to .twig files. Especially multiple .twig files. Messing with them took 3 hours! There's a lot of trial and error involved because when it breaks, you don't know what you broke. Instead of a line number or a stack trace, you get a generic Nextcloud error page. And if you did something right, you still don't know because you have to go into Nextcloud and hit a "reload theme" button for your changes to be reflected.

YAML

All of my pages are Markdown anyway so I'm 90% of the way to a functioning site. What's a pain is adding YAML to the top of every article in order for it to get the title and date of the article. The title's there already as an H2 and the date can come from the filesystem. I guess I can live with it if that's my only option but it's going to chafe my spuds each time. Maybe there's a way to do it in the .twig file, but after all the fun I've had with it so far, I'm disinclined to mess with it further.

What's next

I've got a proof of concept with two pages up locally and have heaps of time to piss around with it until January when my hosting expires. If I get everything the way I like it before then, I'll switch over to managed Nextcloud and use Pico CMS instead. I've got loads more fun to come trying to rewrite URIs to make the routes the same. Prepare for more bile venting about that soon.

Day 45 of #100DaysToOffload

Tags: PicoCMS Nextcloud