|Luke Smith 858ca9dfb4||7 months ago|
|blog||2 years ago|
|.gitignore||2 years ago|
|2019.html||2 years ago|
|FUNDING.yml||10 months ago|
|LICENSE||2 years ago|
|README.md||7 months ago|
|blogindex.html||2 years ago|
|lb||7 months ago|
|rss.xml||7 months ago|
|style.css||2 years ago|
|sup||7 months ago|
Blogs and RSS feeds in less than 100 SLOC.
lb stands for whatever. Maybe "Luke's blog", maybe "lightweight blog", maybe "less bloat", doesn't matter that much.
I've also added
sup, which is even more minimal and focused on old-school static websites with no blog, but a need for a site updater! See it at the bottom of this README.
sup are mutually compatible and you can use them both on the same site and even feed into the same RSS feed.
lb makes new blog posts which go to make standalone pages, a rolling blog file and an RSS entry.
sup, on the other hand, is if you manually add a new page to your website and want to make people know about that change. It can be run multiple times on a page for each time it is updated.
lb is an extremely small shell script that lets you write blog posts and will format them in all the ways you could ever want. Here's what it will produce:
blog/directory, which you can allow to be browsed manually via your Apache web server as I have here.
lb commands are all one letter cause I'm lazy. They all stand for something though.
./lb n(ew) # Make a new blog post draft. ./lb e(dit) # Edit a draft of an entry. ./lb t(rash) # Delete a draft of an entry. ./lb p(ublish) # Finalize/publish a blog post draft. ./lb d(elete) # Delete a published blog post. ./lb r(evise) # Revise an already published entry (you can republish it with `lb p` when done)
lbscript and put it in your website's main directory. The expectation is that your rolling blog file and RSS feed will be there as well.
For the system to work, add the following comment line to a (1) Rolling Blog File (as above), a (2) Blog List File and (3) RSS feed.
<!-- LB -->
You can format these files/pages how ever you want, just be sure to edit the
lb file and change the variables at the top to match the file names of those you chose.
finalize a blog post, it will be added directly below that line in the proper format (either HTML or the proper RSS/XML format), give you the rolling blog and RSS feed for free.
blog/in your websites root directory. Drafts are in
blog/.htaccessacts as a "database" file.
lbstores filenames with their corresponding proper names and publishing dates there.
lb. Only the
lbscript itself is necessary.
$EDITORvariable should be set to your preferred text editor, vim will be assumed if you don't have one set.
sup-- Site updater or "What's up?"
If having a "blog" is too cringe for you and you just want an RSS feed where you can post updates about recently changed pages, use
Let's say you make a page called
sup favorite-programs.html and that new page's content will be added to the RSS feed.
sup will get only the
<body> tag, but also exclude the
<footer> tags. All the rest of the content will be directly viewable via RSS.
If you update that page in the future, run
sup on it again and it will prompt you for an update message
Just add the
<!-- LB -->
line in your RSS feed like for
lb above and be sure to change the variables (rss file name and website) in the
lb are fully compatible and can be run on the same website for different purposes.