Tag: dev

I have been working with David Merfield on a little side project. The idea started simple – what if there was a simple posting interface for Blot? In extension, something that one can use to write and publish a post to Dropbox. Blot is simple as-is for writing and posting (it’s all files). But there are times when I do want to quickly post from my web browser. And for such times, I still need a simple writing interface.

That thought was enough to interest both me and David. We got to work. The project got neglected in between. And then was picked up again. And I think, it is in a state now where it can really be useful to a few. I can attest to that because I, myself, have been using it for few days now.

Here’s Wall — a web-accessible text-editor over Dropbox, works nicely with Blot.

I believe this would be useful for many. It is clean. It is light, pure-client side application. It supports local drafts. It can export markdown. It can publish to Blot. Perfect for all those text posts.

I have my own fork of the project where I want to use the editor and support publishing to multiple places. To start with, I have extended it to post it anywhere in Dropbox.

I have hosted it here as Scribe. I plan to extend it next to be used as a micropub client. Still in works, though.

Of course, this is not perfect yet. For one, it does not work well on smaller screens. But it is a good enough. Do give it try.

Over the last week, I’ve added some features to Blotpub that were long in works – support for syndicating longer posts, support for updating posts. I’ve also automated sending of webmentions to the target sites for reply and like posts types. It’s been some productive week this.

I am having fun getting back into Indieweb stuff — working on adding support for updates to Blotpub. This has been in works for so long, I had to get to it. I also recently added support for syndicating longer posts to Twitter and Mastodon. Always makes me relaxed.

A quick question for the IndieWeb community here, how do you send the webmentions? Is it automated on posting? Is it part of the micropub or an independent script? Are there ready resources, scripts or tools available? I couldn’t find much on indieweb.org.

When you have a mind not too clogged with some insignificant thoughts, one can get things done. I managed to add support for syndicating posts to Twitter from Blotpub. A minor update, sure. But an update nonetheless after a long time. Good to have the focus back.

I realized today that it was on this day a year back that I had opened Micro.threads to all. It was the first project built ground up that I had made available for every one to use. The earlier projects were either customized or personal. It has been a wonderful learning experience.

It was also an opportunity for myself to gain confidence. It kick-started my journey to more hobby projects, inspired me to even write more. Funny how few small beginnings can turn into significant projects.

Recently David documented the steps to expose a JSON feed on a @Blot site. I’ve been running a JSON feed for my blog for some time now, which also drives the On This Day page on my blog. I shared my approach so that others with a site running on Blot can create such a page.

Adding On This Day feature to Blot

Recently David Merfield, the developer behind Blot, documented the steps to expose a JSON feed on a Blot site. I have been running a JSON feed for my blog for quite some time now, with some valuable help from David of course. It is this feed that drives the On This Day page on this blog. I thought I will share my approach so that others with a blog running on Blot can create such a page.

To begin with, follow the guide to get a working JSON feed for your blog. Validate you have a properly formed and accessible feed being served using the JSON feed validator.

One key thing to understand here is how to create a view in Blot. It would be important to be aware of this step to proceed further. A view can be created in Blot by accessing the editing template section (Settings > Template) in Blot dashboard. Click on Edit against your currently installed theme and search for an option Create new view.

Once the JSON feed is available, create a view in Blot for a javascript file. Copy the complete content of the javascript available as a gist* and add them to this new view. Modify the json_feed_url and tz variables appropriately to reflect the URL for the JSON feed and the timezone for your blog, you can refer to the formats in TZ database time zones. This script does the following.

  1. Fetches all the posts as JSON objects from the JSON feed
  2. Identifies the posts that share the same date and month as the current date (but not the year to avoid loading today’s posts)
  3. Renders the posts (or no posts message) in the predefined section detailed below. This also includes some styling via the .className definition, you can remove/modify that as per your liking in fuction renderPost.

Make sure the above created view is accessible at a URL. If not, define a route in the Settings section of the view.

Next, create another view for a page to display these posts; a reference html page is available as a gist. Modify the src in <script src="/flashback.js"></script> to reflects the URL for the javascript created above. The script adds and renders the posts made on this day in earlier years in the div element with id on-this-day.

Do give this a try, it is fascinating to see your thoughts change, or at times stay exactly the same, over the year. Reach out to me if you face any issues or find any step missing.

TL;DR: Expose a JSON feed on your site. Create two views in Blot using the gist flashback.js and on-this-day.html. You should have two additional pages, you can use the same file names. If you do, you can access your On This Day page at /on-this-day.

* This javascript is inspired by and based on the wonderful project Micro Memories by Jonathan LaCour for the micro.blog hosted blogs. I have customized and simplified it as per my needs.

On this day, a year ago

Around a year ago, I got enthralled by the IndieWeb principles and started experimenting with them on my website. Exactly a year ago today, I had started contributing on the Micro.blog platform. And it has been a very productive year writing-wise since then.

I have expressed myself a lot more in the past year. I have thought a lot clearer, a lot better as a result. It is all thanks to the wonderful interactions on the platform.

What it also means is that I have a year worth of posts to look back upon. And I thought what better way to do so than getting the On This Day page added to my blog. I have done that. It presents how the journey started – if nothing else I myself can follow the thoughts along as they evolved.

Will it stick in this same form? May be not. I may experiment a bit on how I see this feature. But I have got the base working now for my blot-based blog.

PS: This feature is based on the wonderful project Micro Memories by Jonathan LaCour for the micro.blog hosted blogs. I have just customized and simplified it as per my needs.

Humble brag alert – Micro.threads used up my free dyno hours on Heroku, for the 1st time. Plus few people successfully setup and used Blotpub. It’s gratifying to see something you build being of some help to others. May sound like minor wins – but for me, no win is ever minor 😁