« Oatmeal

Tagged "meta"

  • David: plays a secret chord
  • Lord: Emacs can do that!?”

A joke, certainly stolen.

Quiet week. Server migration almost complete. Linode is purdy. As is Mosh! I’ve never used anything but ssh, but think I’m smitten with mosh.

I’ve been back filling tags on old posts. Things should be becoming more…connected? Increasing the edge and surface area through which folks can make entrance into posts of all sorts.

I spent a hot second updating the archive and search pages here. One of my goals with my newly revamped website is to open up more ways into the content — trying to think of the website less as a linear timeline, and more of a mess of noodle-y soup. Here are 2 new ways into the miscellany!

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.

Timezones, am I right!?

…my RSS feed ought to be fixed now! 🎊

Do you follow me with a feed reader? If so, take note! The RSS feed for my website has moved. It is now https://eli.li/feed.rss. I put a redirect in place, but not all feed readers like to follow the signs. Mind the gap.

The Life-Changing Magic of Server Migrations

After a bit of procrastination, a bit of noodling, and a generous pinch of typing I’ve started to migrate from my old web host to a new one. I’m starting with my personal stuff, and will then move the client work over.

The basic guts of the set up:

  • FastMail for email, and as my DNS control interface
  • I’m using blot.im to host my primary personal website (this one, eli.li)
  • A combination of Linode and Netlify for my other hosting needs

I’m still ironing out some of the details, but am feeling pretty good about the landscape. I looked into some alternatives to FastMail, but their offering seems to be the most solid, and the DNS control stuff is preeemo. Wicked nice.

To boot, moving my website from my previous web host to blot was a breeze, and resolved the issue I was having wherein my posts weren’t making it to micro.blog. I’m back, baby!

To say I’m impressed with blot is a massive understatment. It is awesome. I don’t have anything to gripe about…nothing, however, is so perfect, and I look forward to writing a future blog post all about the migration process and my blot set up (huge shout out to @amit for all his help, as well as to David who makes and maintains blot — his support is truly next-level).

That was all a preamble, though — the primary reason for this post is to note that I think a few things are going to change around here.

The medium being the message and all…

In the past my blog was more of a link-log, filled with likes and replies. While my website still supports all that lovely IndieWeb taxonomy, I am going to post round-up style posts, aggregating a bunch of links and comments/quotes into a single post. We’ll see if I can get into it, or how it changes things.

The other big change is tags! My old website had tags, but they didn’t really do much. The human ecologist in me is excited to start inter-linking posts by way of tag. Keep a look out for more on that, too!

Finally, the bit of my new website that I am most excited about? Custom css per-post! I have a custom metadata field associated with each post. If left blank, the site defaults to my standard css file, if, however, I put in the name of a different css file, I can associate a unique css file with a specific post!

I’ve always liked the idea of a site’s content and styling being linked. Just as I work to preserve permalinks, I want to preserve what the site looked like at a certain time. I’m not going to use this feature for all posts by any means. Heck, I might not even use it very often, but I’m excited to have the option.

Rah raw ra onward!

I fell off the micro.blog timeline for a bit. During that time my partner started a blog! check it out!

A few recycled thoughts on writing

I don’t think one needs to know where you are going to start writing. You don’t need an endgame, thesis, or goal. All you need is something to explore. Writing isn’t necessarily about the conveyance of specific information. Writing can be a design practice, or a way to learn something new.


A print isn’t a static thing—it isn’t a dead document, or just inked lines on paper—a print is an interface for connection. With technological innovation the immediacy and mode of that connection has changed, but I think at its heart had remained more or less the same.


I write because I don’t know. In writing I won’t necessarily come to knowing, but I’ll begin to move towards it. I write as an explorer seeking some understanding, and wanting to communicate. I write as a beginner…someone who is new to something, but eager to learn more and explore further.

It isn’t pretty (yet), but I’ve got search working on my website! All of my site’s content is stored as static JSON files and I was having a hard time figuring out how best to (quickly) search them all…then I realized that I could use grep wrapped in PHP! Easy peasy. Next up, an archive page of some sort!

A year with the IndieWeb

I’m approaching the 1 year anniversary of my being all in on the IndieWeb! NO REGRETS!

To celebrate, I thought I’d go crazy and write a brief description of what I think the indeiweb is, and how I IndieWeb.

What is the IndieWeb?

People

First and foremost, the IndieWeb is people — a really great group of people. I haven’t found a more welcoming group of folks online. I feel wicked lucky to have found this community, and to engage with it on the daily.

Standards

On a technical level, the IndieWeb is a collection of protocols and standards, namely:

  1. IndieAuth
  2. Micropub
  3. Webmention
  4. RSS
  5. Microformats

Separately, each of these is a powerful tool of the internet. Combine, they’re a nearly unstoppable, Voltron-style robot of webby-social-goodness.

  • IndieAuth turns a domain name into your IndieWeb identity (particularly when paired with h-card markup)
  • Micropub gives you a flexible way to create all sorts of content
  • Webmention and RSS allow you to connect with, respond, and subscribe to other IndieWeb folk
  • Microformats guarantee everyone is speaking the same language (at least on a machine-readable level)

NOTE: there are many other standards at play within the IndieWeb community, but I feel that this group make up the backbone of the IndieWeb.

How do I IndieWeb?

In a word: sloppily.”

But, it is getting better every day.

I started my IndieWeb journey using wordpress, but wordpress and I did not and still do not get along, so, I rolled my own IndieWeb CMS (which I will one day clean up and open source).

I call my CMS Pneumatic Post, and I think of it as less of a CMS and more of an IndieWeb micro-service. It has a couple moving parts:

  • Micropub and media endpoint
  • Display layer
  • RSS feed(s)

I post to my website using either Quill, Omnibear, the Micro.Blog macOS app, the Micro.Blog iOS app, Sunlit 2.0, or Indigenous. Each of these is a micropub client, so all play nicely with my website’s micropub endpoint.

My site currently supports a couple different posting contexts, namely titled posts, notes, replies, likes, and because I have a media endpoint in place, photos. I haven’t yet enabled any other posting contexts because my bases seem pretty well covered by this group.

When I post a like or reply-type post, my micropub endpoint automatically sends the liked or replied-to link a webmention, using telegraph.

I rely on brid.gy and webmention.io to handle all incoming webmentions. I don’t currently store or cache received webmentions, I just display them. Thanks to micro.blog, however, I’ve been having heaps of great webmention-fueled conversation, so I’m thinking I should build a way of storing incoming webmentions, rather than relying wholly on webmention.io.

The last bit is RSS. My site also supports a malformed JSON Feed, but I keep that hidden for the time being, since it relies on unsupported features at the moment and is generally a hot mess. My site spits-out two different RSS feeds, an easily discoverable public facing one that is just a stream of all content posted to my site, as well as a feed of all incoming webmentions. This means that the bulk of my IndieWeb-life is managed through an RSS reader…which is how I like things to be.

That, in brief, is how I IndieWeb.

The future!

What does the future hold? Well, for one, I’m most certainly gonna keep on keeping on as I have been, because I’m 100% in love with the IndieWeb and the IndieWeb community.

I recently stood up my own instance of quill, and imagine I may do some more things like that.

My BIG task is to clean up Pneumatic Post and open source it for others to use. My intention is that Pneumatic Post be as EASY as possible to get up and running with. I tried, and I’ve seen others try to get into the IndieWeb using wordpress, and it works, but there is a bit of a learning curve at times.

I’m also keeping an eyeball on projects like @dgolds nanopub and @hjertness micrpub. I think static sites are the bee’s knees, and I would love to be able to post to one using micropub.

The biggest frustration I have with Pneumatic Post at the moment is search. It sucks. because all of my content is stored as flat files (and there are a LOT of them) there isn’t a great way to index all the content. At the moment I search my past posts with either DuckDuckGo’s site search or JavaScript (I’ve played with both lunr.js and datatables). Neither option is great. I’ve started a project that I dream will become the go-to answer for everyones’ IndieWeb searching needs…but solr is a wee bit tricky…and I’ll admit that I’m a bit out of my depth. In the meantime, I think I may just run a little database alongside my flat files and search with good old fashioned SQL queries.

Finally, I’d very much like to attend an IndieWebCamp, and, host a Homebrew Website Club. From the digital to meatspace.

In conclusion

Do you IndieWeb? Do you want to IndieWeb?

I’d love to talk IndieWeb with you.

Sincerely and thank you kindly,
Eli

#indienews

Currently, whenever I reply to or like a link the source URL displays. I’ve found a really sturdy way to parse content titles, but the performance is absolutely abysmal. Wicked wicked wicked slow. I think it may be something to do with how I’m invoking the function. I’ll keep poking at it, though, since it makes for a much better presentation.


function url_get_title($url)
{
if (!function_exists('curl_init'))
{
die('CURL is not installed!');
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);

$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

// FAIL
if ($httpCode == 400) return $url;

// SUCCEED!
if ($httpCode == 200)
{
$str = file_get_contents($url);
if (strlen($str) > 0)
{
$str = trim(preg_replace('/\s+/', ' ', $str)); 
preg_match("/\<title\>(.*)\<\/title\>/i", $str, $title); 
return $title[];
}
}
}

Pass the function a URL and you’ll get the <title> attribute back unless curl fails for some reason (looking at you every Squarespace site ever), then you just get the URL back again.

now that I have a working micropub endpoint I don’t know what else to post about 🤦‍♂️🤷‍♂️😔😛

Well, I’m able to post text content using quill’s editor, but only if it is HTML encoded. Can’t post normal notes. 

Micropub endpoint seems to be about 80% of the way there. Next big step is getting a media endpoint in place.

Posting via email via quill?

…and now my website automatically backs itself up to couchDB! One day I may use couchDB to serve the content, but for now I like having static content. 

Alright! The next big step is to figure out how to build a micropub  endpoint. I’ve been playing with Adactio’s minimal micropub endpoint, but so far no dice. 💀 🎲 I keep running into issues around the scope?’ but I don’t really have a clue what that means 😬