An introduction to CL-BLOGGY
Blogging with CL-BLOGGY
22nd of August 2021 at 01:12am SAST
Okay, lets write an introduction to how you setup and use cl-bloggy.
IntroductionCL-BLOGGY is a Common Lisp library that allows you to live code entries into your blog. It is designed to be highly extensible; the majority of the functionality has been implemented using Generic Functions, this means that as a user you can customize the behaviour of most of the system, although I imagine you would primarily be interested in customizing its appearance. By utilizing the CLOS I have created a webpage generator that allows the user to fully customize the appearance and the layout of their own blog. By writing a Lisp form you are able to produce a nicely formatted and ready to go blog post in your own instance of CL-BLOGGY.
At the time of writing this library handles the following:
List of cool things:
- Creation of blog posts.
- Deletion of blog posts.
- Direct links to posts (obviously)
- Ordering of posts by date.
- Ordering by date within an index.
- Ordering of posts by categories
- Nesting of categories, ie each category is a child of the former 'general <- programming <- common lisp <- cl-bloggy', a category can only have one parent but many children
- Creation of a primary RSS feed at
(format stream "~A/rss.xml" (url (blog <acceptor>))
- Creation of category based RSS feeds at
(format stream "~A/~A/rss.xml" (url (blog <acceptor)) (url category))
- Customizing the layout of the blog, entry and index using generic functions.
- Minimalist CSS, currently 3 external style sheets are imported by default: milligram.io, normalize.css, and Google's Roboto font (required for Milligram)
- Customizing the colour scheme of the blog, entry and index using generic functions.
- A simple 4 palette colour scheme using both CSS and Common Lisp global variables for easy theming
- Sane but currently as of the date of this article, changing default CSS.
The goal of the library is to allow a Common Lisp user to setup their own
blog, on their own VPS where they can create and manage entries with ease.
It's designed to be highly extensible, what is the point writing it in CL if
it isn't built this way? It is designed to be open to the programmer, each
object in the system has access to the others, even the instances of blog
instantiated for rendering categories are aware of the top level blog. The
library has been designed this way because it allows an experienced Lisper to
customize the blogging system however they want. The code should also be easyish
to understand, I know that every Lisp programmer has their own programming
style, but my intention with this library is for it to be reasonably readable
with minimal use of macros, so code readability over macrology
Programs must be written for people to read, and only incidentally for
machines to execute. - Abelson & Sussman, in the preface to the
first edition of SICP.