2019-07-04 | Usage | MCJ Introduction
I have created sites like this many times before over the last two decades. I have tried many different kinds of content management systems (CMS), using BASH scripts, PHP Nuke, Perl, Ruby... pretty much everything you could imagine. This is what I came up with as the easiest with my preferences and experience.
One design consideration is portability and resilience. I run things local and keep them out of a database. Some of this is purely pragmatic; for instance, if I kept the articles that documented how to bring up a graph database using Virtuoso, which will happen, there is no way to read the documentation if it is stuck in a Virtuoso data store.
All programs, all documentation related to the CMS should also work in the reference OS, which is Ubuntu 18.04 with a snapshot set of packages from 2019. CMS refers to the system that created the page you are now reading this on. You can build this yourself using directions on this site. This is also useful for the general systems resilience ideas of the SysAdminTools.com site.
One feature is that the system deals with source easily. I am writing this on iA Writer Classic. It is a pretty great editor suited to Markdown (Yes, I know this seems to contradict my earlier statement, but editing the files themselves is a personal preference. I still have one foot in the Mac world, so while I am running this system on MacPorts, I still test it on the reference OS.) But, back to the problem of source. I place markers for source code like this:
alias fja="cd /Users/divine/sysarts/categories/cms/articles/201907041/;vi article.md ;pwd" alias fjt="cd /Users/divine/sysarts/categories/cms/articles/201907041/;vi title.txt ;pwd" alias fjc="cd /Users/divine/sysarts/categories/cms;pwd" alias fj1="cd /Users/divine/sysarts/categories/cms/articles/201907041/sources/1/;vi 1.txt ;pwd" alias fj1t="cd /Users/divine/sysarts/categories/cms/articles/201907041/sources/1/;vi 1.type ;pwd"
I number the source code in the directory tree, and the CMS automatically highlights and converts to HTML. This is problematic on IT sites, usually. I also use live.js to automatically load the page. Here is an example:
I build the site life using a Python monitoring script. It triggers anytime a file changes in the directory and rebuilds the static HTML.
Finally, I have created a text-based console to enter, categorize, and tag new articles. It also creates aliases that I can load up into my shell to further edit the files, as in the above script example. Here is what the console looks like:
This is much more efficient, for me, at least, to create articles quickly. Going out to a mouse frequently takes longer. This also allows me to embed the structure of the data in a way that is easy to maintain.
I will dig into each part of this further over the coming years.bash npyscreen python