Today was a good day for better blog, it received a whole mess of much needed features! Some of them I had been working on and simply had not gotten pushed live yet for one reason or another, and some of them just got put in today. Either way, there are good things in these updates!
- Caching Most notably is a sort of caching mechanism. You may be aware, Bearblog is already reading from flat files, so it is very quick to read in a posts content. However, in order to do listing pages, Bearblog needs to read in every post and be able to rearrange and sort through them. Especially for pagination, and later to come, category pages and tag relationships.
The way the caching works here is that a timer fires when the server is started and then on set intervals afterwards. This timeout will grab all posts from the filesystem and store them in a cache object. It will then update mappings it has of sorted posts data to their post index (an ID of sorts, but really just an array index).
Currently, the only mapping is by_uri and is used for getting a single without having to sort through every post until a match is found.
Pagination Listings are now paginated at every 10 posts and page links show up at the bottom. Pretty straightforward feature. The next update to come with this is a single post having links to the "next" and "previous" posts.
Conf.js There is a new file now that exists in ./app/ named conf.js. This file now stores data like sitename and baseurl, more stuff will probably get added to this over time, but the goal is here is to make updating to new versions of bearblog easy by pulling out your site specific data.
Meta Tags There was a bug (of sorts) in which all meta in a post file was being output in the HTML as meta tags. These tags are now limited to: keywords, description, robots and title. If more need to be added, it can/will be done. These were the important ones I thought of for now.
That is all I can remember for the major updates. Some really cool features in there and I personally think Bearblog is coming along quite nicely at this point. I promise there will be more comments to come down the road.
You can check out Bearblog on github for more info.