« Oatmeal

Tagged "blot"

Follow this tag

I created a tag-specific rss feed for my blot.im site, and you can too!

I’ll be the first to admit that I post a lot of disperate stuff to my website. Maybe folks don’t wanna follow it all? Maybe you just wanna follow my link log posts? Now you can!

I’ve added the ability to subscribe to rss feeds for posts with a specific tag. From any tag page, you’ll now find a link that (as of this moment) says Follow this tag.” Clicking that will expose the tag-specific rss feed.

Do you use blot? Wanna do the same?

3 easy steps:

Step the first

Create a new view to use for the rss feed. I called mine tag.rss.

Step the second

Paste the following code into the newly created view.

Step the last

Access the new view, someurl.com/tag.rss?name=pineapple, where pineapple is any tag you’ve applied to content on your site!

Now that you’ve got a working tag-specific rss feed, expose it to your readers somehow.

As always, huge shoutout to David, the mastermind of blot.im.

Of note: this functionality is currently undocumented and could change down the road.

Through blot’s dashboard you can inspect a 404 log for your website. This is essentially a list of all the whiffs against your domain — whenever someone tries to visit a URL at your domain that doesn’t actually exist that gets logged. No info about the person/bot visiting the site is saved, just that someone or something tried to visit a specific URL that doesn’t actually exist.

Reviewing the log this evening I learned a few things:

There don’t seem to be many folks missing what they hope to find on my site (this is good!).

My domain receives more malicious traffic than I would have guessed — it looks like a lot of automated attempts to brute-force into common WordPress, Drupal, and other big-name CMS vulnerabilities, as well as a surprising amount of plain old SQL injection.

Stay safe out there in internet-land.

On a similar, yet tangential note: I have no desire to add any sort of analytics to my website, but I am curious from time to time about how many folks read this thing, and more importantly, in what format — RSS, micro.blog syndication, something else? Is what you are doing working for you? Is there anything I could do to make that experience better? Would anyone be interested in my starting an email newsletter? Let me know if you’ve got thoughts on this!

A love letter to Blot, one week in

Gone are the days of running my own, home-spun CMS. They were fun, and I learned heaps, but I was ready for a change. I’ve moved to blot.im. I am smitten.

Blot is a blogging platform with no interface.” It allows you to plop a bunch of markdown, txt, doc, or even image files into a folder and automatically builds and deploys an update for you! Blot can use either Dropbox or git as its sync engine. But what about all that indieweb goodness!?” you shout?

Aye — it is still here! Because blot templates are wicked extensible it is relatively trivial to extend them to do all kinds of things.

Getting off the ground with blot was a breeze.

The blot.im homepage.

As of right now (January 2019), blot doesn’t offer a free trial. The first thing to do is register an account.

Registration doesn’t ask for anything out of the ordinary, was wicked low friction.

The blot.im registration page, note – the price is about to go up!

  • Email
  • Payment details
  • BOOM!

Once registered you receive a confirmation and a receipt email — then you are up and running!

Select your sync provider, either git or Dropbox (this can be changed at any time).

The next steps are to set up a username (which doubles as your subdomain at the blot.im domain) and choose a sync provider.

I don’t know why, but it is amazing to me that you aren’t locked into a sync provider after making your initial choice. If, down the road, you decide to swap git for Dropbox, or the other way round, that isn’t an issue! No lock in. Great for portability. 🕺

Your blot dashboard! Well, this is an image of mine, but, you get the idea.

At this point you have a blot site. It has some basic boilerplate content, and is waiting for you to start adding content and configuring your template. Blot comes with a couple pretty templates out of the bag, but is also wicked extensible. The documentation is decent, but certainly has a few holes in it here in there. The good news is that blot is open source, so if you know what you are looking for you can poke around in the code. Or, and this is probably blot’s best feature, the primary (perhaps sole?) developer behind blot, David, is easy to contact, and happy to lend a hand.

Blot allows you to configure a lot of extras, including setting up redirects, on an either per-page basis, or by following regex rules.

After fiddling with a few settings, and switching a few switches I took a step back to take a look at my existing content. I needed to migrate just shy of 3,000 posts from my old website to blot, and I wanted to preserve their URIs if at all possible since, URIs shouldn’t change.

A dash of hacky PHP to migrate from my old plaintext json filestore to plain old markdown files with a bit of front matter.

Luckily for me, migrating my content was as easy as writing a sloppy little bit of PHP to convert each json file into a markdown file. I added a bit more extra metadata durring the migration process, just to make sure I was preserving as much info as needed moving forward.

Once the data was re-formated, I just had to plop it into my fancy blot directory! ZAP BOOM!

It is pretty much magic.

Some of the magical redirects in the digital flesh!

Once my content was in place I set up a basic redirect rule to map my old URI pattern to a new one, and everything just sort of worked.

With content in hand, the next step was to create a custom theme. This was way more fun than I anticipated it would be. Blot uses mustache templates, which I’ve used a bit in the past and always found frustrating when compared to something more feature-full, like handlebars, but in this instance, mustache does the job wicked well — I didn’t have to jump through any hoops, or come up with any hack-y solutions to get around mustache’s lack of useful logic.

The custom theme I came up with supports a few fun things (if I might say so myself).

Two worth calling attention to are bespoke-css files, and IndieWeb compatibility.

When I create a new post or page I can add an optional bit of metadata, bespoke-css with the name of a css file as its value. For instance, this post has the metadata:

title: A love letter to Blot, one week in
date: 2019-01-28-16-07
bespoke-css: article.css
tags: meta, blot

Setting bespoke-css will override the css file that would otherwise be associated with this post — that means I can tie particular css files to specific posts. No real reason to do this, it is just something I often want to do.

Finally — the IndieWeb goodness:

To set the stage, my old site had decent support for most of what I consider to be the core indieweb features, micropub, webmentions, and microformats.

My new site currently supports receiving webmentions (thanks to Amit) and includes all the necessary microformats markup.

All my posts are funneled through micro.blog, so that mostly handles my outgoing webmention needs, and, if not, sending a webmention manually is not difficult.

My new site does not currently have a micropub endpoint. They exist for blot, and seem easy to write, actually (I also noticed that David is thinking about adding one to blot’s core code), but so far, I haven’t needed/wanted one. I think I posted a wee bit mindlessly to my old site because it was so bananas frictionless. Posting is still wicked easy, but I want to bring a bit more intentionality to my posts…I mean, I want to try to do that. We’ll see how it goes.

Basic blot blogging from the command-line

Posting to my blog is a breeze from mobile thanks to a couple shortcuts and Drafts actions I’ve put together. I wanted posting to be just as seemless from my computer, too. Here is my quick and dirty solution!

#!/usr/bin/env bash

cd "$(dirname "$0")" # Go to the script's directory

DATE=$(date +%Y-%m-%d-%H-%M)

# The paths to your blot website's draft and post directories
DRAFT_DIR=/Users/someuser/Dropbox/Apps/Blot/drafts/
POST_DIR=/Users/someuser/Dropbox/Apps/Blot/posts/

USER_INPUT="$@"

# Your editor of choice
EDITOR='emacs'

if [ -n "$USER_INPUT" ]; then

    if [ $USER_INPUT == "post" ]; then

        printf "title: \ndate: ${DATE}\ntags: " > ${POST_DIR}${DATE}.md
        $EDITOR ${POST_DIR}$DATE.md

    fi

    if [ $USER_INPUT == "draft" ]; then

        printf "title: \ndate: ${DATE}\ntags: " > ${DRAFT_DIR}${DATE}.md
        $EDITOR ${DRAFT_DIR}$DATE.md

    fi

else 

    printf '\nBlot blogging from the command-line.\n\n    draft   create a draft post\n    post    live dangerously and just post that sucker!\n\n'

fi

In the future I may expand this to support editing existing posts, too. I’ve also been toying with a way to do this without ever leaving emacs.