The principle thing driving my upgrade of the software to version 2.0 is handling the problem of someone taking down your blog. I happen to be politically incorrect, and in today’s toxic political environment, I can see someone taking down my blog for something they are offended by.
I keep backups of all my articles offline. But that’s just the content. Outside the blog itself, I don’t keep track of the excerpts (now renamed “teasers”), the topics the posts fit into, the timestamp and the like. That’s all metadata in the blog’s database, set at the time I upload it. If I had to piece this together, it would be a monumental task, made more difficult with each new blog entry.
How to solve this problem? The best answer I could come up with was to include the metadata in the post itself. The software could parse the file on upload and make all the topic, timestamp updates as needed. No longer would you need an upload screen with a bunch of fields to enter in. Just an upload button.
Yes, this introduces a formatting burden on the user, but it’s the only way I could see to have the metadata included with the article itself. The metadata looks like this at the top of the file:
@title My Cosmic Article
@markup md or html
This is my teaser...
Lots of content here, and blah blah blah
So I had to implement code to parse this “header” and suck in the content.
Naturally, I had to include a
recover.php script to reassemble your
blog if it gets smashed. One caveat: if all you have is your blog
entries, then I can’t reassemble the left hand navigation links from
that. You have to do that yourself. Similarly, I can’t remake your topic
names. The abbreviations used in the metadata can be added, but I don’t
know the original names for these topics. You have to do this yourself.
In the same way, I can recreate part of your user record, but not your
name and your password. You have to redo that yourself.
I changed the name of “excerpts” to “teasers”. That’s really what they are. They’re there to entice the reader to read the article.
The next change was more interesting. Typically, I write my blog entries in Vim, using Markdown syntax. I then have to convert this to HTML to upload it. What if I could just write it in Markdown and just upload that?
So I introduced the ability to upload Markdown, in addition to HTML.
You’ll see in the template above, the
@markup keyword. The user can
specify “md” or “html”. This saves me a step. I’ve written things in
HTML before, but it’s a tedious process. Markdown is vastly easier.
Then it occurred to me that users would want to add links on the left
hand side of the page to things like their resumé or a link to
some other site they own. Formerly, this was a PHP array of links
formatted in a certain way, called
navlinks.php. But it’s a little
much to expect a user, even a hacker, to manipulate PHP, if that’s not
their native language. So I stored the navigation links array in a
serialized PHP file called
left-nav.serialized. Then I added an option
in the admin screen to add links to this left hand navigation menu.
If the user wants to add sub-headings and such, that becomes their job, and I can’t help them. To provide this capability means that I’d have to write code to reorder headings and links, and all sorts of unpleasant things. I haven’t the time.
I also added the ability to view blog entries by author, for cases where there are more than one author on a blog.
There were numerous changes to various libraries and bug fixes. A lot of work.