Today's PR adds a News section to the CMS. This is extremely similar code to the blog feature (minus the unfinished multi-blog stuff), and at some point I wonder if there's scope for using the same code to run both sections - or at least abstracting a lot of the common functionality - but for now, a clean copy and 'rebranding' will do...
Today I added reCAPTCHA to the user registration process. This included doing some refactoring of the existing reCAPTCHA protection on comments, to make some of that code more re-usale.
I also added MJML support, and comment notifications.
The comment notifications go out to the owner of the site (can be configured on/off), the author of the content being commented on (if it has an author), and (in the case of not-top-level comments) the author of the comment being replied to, if we have an email address for them.
Today I merged the first chunk of work on discussions / comment threads.
As in the original ShinyCMS, the comment threads (and sub-threads) are fully nested, so you can easily tell what's a second/third/etc level reply and see who is talking to who.
To get the nested comments to display with the correct indentation at each level requires recursion*. Understanding recursion is nearing the limit of how clever I get on a good day, so in the past I have occasionally regretted writing this feature when I've had to work on it on a less good day ;) Not as much as I'd regret having written a comments feature with Facebook-style single-level nesting though :)
I added some new demo data (and updated some of the existing demo data) so that all of the current features are covered again.
The reason for including the demo data, and making sure it covers all the features, is so that anybody who's curious can install a dev copy of ShinyCMS locally or on a free Heroku set-up, load the demo data, and immediately play with all of the features of the CMS... without having to do a bunch of boring data entry work first.
Added tags to blog posts, and a Tags controller to view all tags. This was pretty straight-forward, as I'm using ActsAsTaggableOn to do all the hard work. And most of the easy work too ;)
There's obvious scope for abstracting this more at some point, but for now I justed wanted to get the basic functionality working and merged in.
I've been refactoring how themes work, and I'm much happier with it now. With the new set-up it's easy to just override just one or two partials if you want, or maybe just override the layout, but still keep using most of the default partials if they suit your needs. If I can keep the HTML in the default views clean and flexible enough, I think this is going to make theming the hosted site quite low-lift for most normal use cases.
I'm still optimistically hoping that at some point this project will attract some people who just love making and sharing themes :) Design and front-end development has never been my strongest skill, so instead I'm trying to make it as easy as possible for people who do have those skills to come and join in one day!
This PR introduces a Theme model (POR, not AR) which can collect any useful theme-related functionality going forward - utility methods to find out if there's a theme in effect currently, what it's called, where its files are located, what other themes are available, etc etc.
I merged the refactor and rename of shared content today; the feature is called Inserts now (which is a much better name, imho!) and I got rid of the slightly complicated form model thingy that was holding them together, creating an otherwise pointless InsertSet model to do it instead. This makes a lot of the surrounding code much more standard, which I think is an overall win.
I've added the jQuery Smart Menus plugin to drive the menus on the main site, allowing themeable nested menus and so on.
Answers on a postcard in a comment please...
Appropriately, the first merged PR of the year brings us a whole new Ruby - from 2.6.5 to 2.7.0 - as well as updating various gems. :)
Just before I run out of 2019, I've merged one last PR for the year; this adds the blog post 'teaser' method (and some other odds and ends for the blog).
This project has been running for 3 months now; I think it's going okay, although sometimes when I look at the size of the to-do list, and compare it to the 'done' list, I'm a bit daunted. The original really did acquire a lot of features over the years! Still, it's good to have goals right? ;) And I'm definitely getting more comfortable hacking on Ruby now, which was my original objective for this project.
So, bring on 2020, and hopefully many more CMS features :) I hope to have reached feature parity with the Perl version before the next NYE is upon us, although of course that does depend on the rest of life behaving itself. Wish me luck!