site  contact  subhomenews

BashBlog forked to shellCMS

August 31, 2017 — BarryK

This news blog started life powered by BashBlog, project page here:
https://github.com/cfenollosa/bashblog

It is very simple, too simple I soon realised. I have been hacking on the script. Some hacks are specific to my requirements, some are generic and could be adopted by the BashBlog developers if they wish.

As my script has become very different from BashBlog, I decided to give it a new name, shellCMS. It will be hosted on my site soon, expected to be here:
http://bkhome.org/shellcms/

Here are the main changes from BashBlog:

Local development
shellCMS is designed for local development, whereas BashBlog is designed for development on the remote site.
shellCMS allows use of a nice local markdown editor, such as Geany with markdown plugin, which has real-time preview.
A script remote-sync uses rsync to upload the files to the remote site.

Redesigned page layout
There is now an overall table, of fixed width, to optimise fitting in a mobile device window.
There is a banner image at top, with links just below the banner.

Document mode
shellCMS can now be a document manager, not just a blog. There is a variable, MODE, that can be set to "blog" or "document".
Blog mode is what you are seeing now, on this blog. Here is an example of document mode:
http://easyos.info/tech/

Sub-folder-storage
BashBlog stores everything in the same folder. The filesystem will slow down as the number of posts increases, so BashBlog does not scale very well.
shellCMS stores posts in sub-folders.
In document mode, the sub-folders are named by tag (category) (and only one tag is allowed per post).
In blog mode, the sub-folders are named by post-date, in format yyyymm, for example 201708.

page-splitting
Another reason that BashBlog does not scale well, is that a page view of all posts with a particular tag, can be very big, if, for example, there are 1,000 posts. In fact, this is a horrendous situation, as an enormous page is created.
shellCMS will only create a page showing the first 8 of those 1,000, with "Older" (and "Newer") links. Up to 5 older pages can be viewed, past which a history summary page is displayed.

Tags: shellcms