Excursions avatar

Excursions

Apple needs to launch a TV+ app for Android. They have one for music. So I can’t understand why they won’t launch one for their TV offerings too. It’s such a pain to watch their shows and movies on a non-Apple mobile device. And I won’t buy an Apple device just for TV.

At times I feel everyone other than me is doing so much with their time while I sit here blank, staring at the screen. Not doing any thing that I should be doing. It sucks when this thought strikes.

Redacting takes time. You can’t edit pictures by thinking; you have to do it by looking. The more pictures you have, the more you have to look.

Source: Your Camera Roll Contains a Masterpiece | The New Yorker

I have been very keen on listening to Audiobooks recently. The moment I have some spare time, I am listening to the audiobooks. That does not bode well for my other interests. I also blame the brilliant collection of books I have been recommended🙃.

Dyson’s headphones blow filtered air at your face

Dyson said it engineered the headset to fit comfortably and distribute weight evenly, by drawing inspiration from horse saddles.

Seriously, WTF!

OnePlus is promoting their upcoming device with this tagline - “our most advanced cooling system ever”. That doesn’t sound like a good strategy to me.

When there are too many things I want to write about, I can’t publish any. I usually then take a pause, scribble a few words and save them as draft in Ulysses. The dashboard interface of Svbtle was pretty unique in that sense - a flow of unpublished ideas it was called. I wish the blogging platforms were bolder with Dashboard’s designs.

At times, Wordle is all about luck when it’s all about which character you select with 10s of solutions possible. I wasn’t lucky today – I ran out of tries guessing all the wrong characters.

I upgraded to Galaxy S22 today. I love the design of this phone, plus the feel in the hand. It’s compact, yet powerful. I also like what Samsung has done with Android. This possibly is the best compact smartphone out there. Not just with Android.

I don’t care about Wordle streaks. Rather, I can’t. I never solve it at a single device and so never manage a streak. Well, that’s not the only reason, either. I don’t solve it daily anyway.

After a break of 3 weeks, I sent out the email letter with posts from the last weeks. The posts weren’t many, but I like to write and share these letters. I usually do not write them ahead of time. I do so when I receive the schedule reminder. It gives me a chance to think about and share what’s at the top of my mind now.

Of course, there’s a downside. When life keeps me busy, as it has for the past few weeks, I can’t word these letters. But I have stopped making it too much of an issue. It’s ok if I cannot send the letter out. Anyway, I am not doing this to gather a follower base, but to send a personal letter to the few interested friends.

Today’s Wordle was tricky. Two tries in and I had a big smile on my face. I am sure I wasn’t alone.

It’s been so long that I listened to any podcasts – the audiobooks are keeping me busy.

The Micro.blog Android app has improved a lot over the last 30 days. I must have missed a few updates from @vincent for sure.

Not visiting timelines was refreshing. I don’t think this experiment will stay though. Being stagnant online is not something I like. That’s what I become when I’m not reading other’s thoughts. Funny how our minds work – you give it more space, it stretches and goes to sleep.

iPhone SE is a lazy upgrade — Apple is a boring company. If there is one thing that will dent the juggernaut that is Apple, it is their tendency to play safe to cater to the majority. We need to sell in millions, so we can’t experiment too much on design. I understand the why. Consumer aren’t supposed to care.

The strategy might work in US. Apple might throw numbers to prove that SE sells well worldwide. But all they are doing is to keep a manufacturing unit running since last 2014.

India is an extremely competitive market on price and I am tired of waiting for Apple to price their low end devices well.

SE needs a better, modern design. Be bold and make one custom for smaller devices. Or stay lazy and make iPhone 12 mini your new SE. Or if that’s too premium, make iPhone 11 the new SE. But kill those bezels already.

And 64GB? Still. Seriously?

I have recently been a lot picky about the stuff I buy. Or the subscriptions I sign up for. Or the projects I undertake. I was never good at it. And I don’t claim that I have mastered the skill now. I still struggle to recognise the price that I would eventually have to pay. First look, the listed cost looks cheap. But I have started asking now, “can I pay the second price?”

The answer is usually a big no. David Cain succinctly words the reasons behind this problem of mine (the above linked essay is a must-read).

I believe this is one reason our modern lifestyles can feel a little self-defeating sometimes. In our search for fulfillment, we keep paying first prices, creating a correspondingly enormous debt of unpaid second prices. Yet the rewards of any purchase – the reason we buy it at all — stay locked up until both prices are paid.

I could also closely associate with the side effects of this problem, as David lists them. This made me acutely aware of the gravity of this pilling debt.

This scarcity feeling creates one of the major side-effects of our insurmountable second-price debt: we reflexively overindulge in entertainment and other low-second-price pleasures –- phone apps, streaming services, and processed food — even though their rewards are often only marginally better than doing nothing. This stuff is attractive because it takes little effort (and we’re tired from working to pay for so many first prices) but it can eat up a ton of time, depleting the second-price budget even further.

I have been away on vacation since the last few days – I had no network I could connect to. My hotel did provide me an option to connect to Wifi, an offer that I humbly declined. As a result, I don’t remember any other visit to a beach that was this peaceful.

The guiding philosophy is “Go deeper, not wider.” Drill down for value and enrichment instead of fanning out. You turn to the wealth of options already in your house, literally and figuratively. We could call it a “Depth Year” or a “Year of Deepening” or something. In the consumer age, where it’s so easy to pick up and abandon new pursuits, I imagine this Depth Year thing really catching on, and maybe becoming a kind of rite of passage. People are already getting sick of being half-assed about things, I like to think.

Source: Go Deeper, Not Wider

Last year, TikTokker Avery Steeves posted a video asking why no one talks about how there’s an entire generation of teenage girls who taught themselves to code HTML on Tumblr. “People are like, ‘Oh, there’s no girls in STEM,'” she says, imitating the faceless internet mob. “No, there were! They were just making pale blogs,” an emblem of the washed-out, soft-grunge aesthetic popular on the platform in 2014.

Source: How Tumblr taught young women to code

Seriously Samsung, do you want me to still “pre-book” S22 — one you launched on 9th February — for a delivery in April first week? How do you always find new ways to botch up launches?

This year (2022) is going to see my journal/log’s 10th anniversary and 100th notebook. After many attempts to write this up, I’m just going to disgorge it all. This article is long and rambling and I make no apology for it.

Source: My Notebook System - ratfactor.

I don’t even know what to think of this. It is extensive and over-planned for my liking. I can’t do consistently follow through with such a system even if I wanted to. I am glad I don’t want to.

Satisfaction that’s one minute more

Whenever I wake my daughter up in the morning (thankfully, I don’t have to do it every day), she has this habit of pushing her face further deep into her pillow and just raising her one finger. It conveys just one more minute, Dad! It’s so adorable, and freshens me up every time she does that. And I play along as a dutiful father.

It doesn’t matter for how long she has been in the bed. She may have slept a good 10 hours of good night’s sleep, she still has her finger up when I go and wake her up. It is the sleep that she gets in the extra minute that’s dear to her.

We love this little game of ours. When I knowingly wake her up early, and she knowingly raises her finger up. When that minute is up, I act tough and pull her out of the bed. She knows I am acting. I know she knows. Both of us wear a smug smile on our faces.

Liked a thought by Noah Garfinkel

One reason I still have trouble believing crypto currency is money is that there aren’t commercials for money.

Porting Hugo theme to Micro.blog

Micro.blog is a blogging platform built over Hugo, a fast static site engine. Given the way it is structured, every theme created for Hugo can potentially work with the blog hosted by Micro.blog. However, there are a few aspects added to Hugo that are specific to the way things work in Micro.blog. These need to be included as part of the themes to make the most of the features of this platform.

This article presents a non-extensive list of things that should be evaluated and included while porting a theme that is made for Hugo to Micro.blog. I have written this as I dug into the existing themes while porting Paper theme. As of this writing, a theme is considered as a plug-in in Micro.blog. Hence, many references link back to the way plug-ins work with the platform.

To reiterate, this is not an extensive list. Based on how a theme, that is being ported, is set up, one may need only a few of these steps or may need a few more than those listed below. However, this should be a good start to get a working version of the theme out for testing. If there are any issues or concerns, please reply to our email addresses.

Pre-requisites

Of course, the article assumes that you have already identified the theme that you want to port. The Hugo theme Showcase is a good place to check for all the wonderful themes available.

Though you are not required to have a detailed understanding of Hugo to port a theme, the knowledge on the below aspects should be handy.

Getting Started

The first step to get started is to access and clone the repository of the theme to be ported. You can either do this offline on your desktop or directly create a new theme in Micro.blog with mentioning the theme repository URL as Clone URL. You could then select this newly added theme as a custom theme for your test blog. This allows you to find out what breaks and also validate the additional modifications that you make to the theme.

For a theme to work, you only need a few folders and files — a typical Micro.blog theme directory structure is provided below for reference.

.
├── theme.toml
├── config.json
├── plugin.json
├── layouts
└── static
  • theme.toml - Contains bare meta information about the theme, like name, description, license, features, author.
  • config.json - Contains any properties required and referenced by the template files of the theme. If the property is to be provided by the user, typically it should be taken as a setting, defined in a separate file.
  • plugin.json - Contains meta information about the custom theme to be displayed as part of plugin repository. It also defines the feature settings that can be provided by user while plugin configuration. Refer to official guide on plug-ins for more details about this file.
  • layouts - A folder that stores html templates that defines how views of different content types will be rendered on a website with the style.
  • static - A folder that stores all the static content like CSS, JavaScript, etc.

You can get rid of all the other unnecessary files and folders and only keep the above-mentioned ones. This will keep the list of files in which changes are to be made manageable.

Before we move ahead, here’s a list of basic template files in the layouts folders that one would modify typically to port a theme.

  • /_default/list.html - A template that renders pages with multiple pieces of content, this includes the homepage. A homepage can also be independently styled by defining a template index.html in the root directory.
  • /_default/single.html or posts/single.html - A template that renders a page for a single post.
  • /_default/list.archivehtml.html - A template that renders the archive page of your website.
  • /partials/head.html - A template that defines the head section of your final rendered HTML.
  • /partials/header.html - A template that defines the header of your blog. This typically includes the site title, subtitle, navigation menu etc.
  • /partials/footer.html - A template that defines the footer of your blog. This typically includes the copyrights, author information etc.
  • /_default/baseof.html - A base template that stitches all the above defined partials together, including the main sections defined in list and single template pages above.

A theme might have all the above files, or have just a subset of these. In case a theme does not provide a particular template file, one from the basic theme (which forms the base of every theme) of Micro.blog is used.

Moreover, make sure you configure the appropriate Hugo Version to be used for your blog. Micro.blog allows two versions of Hugo to be used, 0.54 and 0.91, the latest being relatively new. Many themes may not work with the older 0.54 version of the Hugo, typically indicated by the min_version configuration in the theme.toml. If the value is above 0.54, set the Hugo version to be used as 0.91. This can be done via Design → Hugo Version.

Fix the Broken Pages

Usually, the home page might not render the list of all the posts with the ported templates. This is often due to the wrong selection of the posts. To check the selection, visit the list template mentioned above and fix the file which is fetching all the posts. It should typically look like below where you pull all the regular pages where type is defined as post.

{{ $pages = where .Site.RegularPages "Type" "post" }}

A similar fix would also need to be applied to the archive page’s template, if it is defined custom. The archive page would also need styling the components appropriately, as these are all Micro.blog specific classes, not part of the default styling of the theme.

Next, you will have to fix the templates to handle the title-less posts. Most posts published with Micro.blog are, well, micro-posts with no titles. So, wherever a Title is referenced, it should be wrapped in a {{ if .Title }} condition. So, the title reference at every place should read like below.

{{ if .Title }}
	<h2>{{ .Title }}</h2>
{{ end }}

The title-less posts might also need minor styling fixes. A typical pitfall is when a post permalink is only available with title. So, a micro-post requires a different element to carry the permalink, mostly the date-time of the post.

Another aspect that is typically broken is rendering of the taxonomy. Most of the themes in Hugo use tags to define the taxonomy. Micro.blog uses categories and hence need to fetch them differently. So at every place a template mentions tags, mostly on list template, archives template and single template, replace them with categories. This primarily involves replacing all the references of .Params.tags with .Params.categories.

With these changes handled, you should have a working website that renders correctly. However, it is still not customised to include the benefits that Micro.blog brings to the table.

Add Micro.blog Specific Tags

Micro.blog packs the key IndieWeb principles, like IndieAuth, MicroPub, Webmentions, out-of-box for all websites hosted with the platform. However, this does involve defining a few relevant aspects at appropriate places. In addition, the platform is also rich in the ways a user not adept with coding can customise their website to their liking, with support for providing custom CSS, footer and plug-ins. Enabling these also need relevant components to be defined.

The changes to be made are in two files. First, modify the partials template that defines the head section of your website, /partials/head.html.

<link rel="stylesheet" href="{{ "custom.css" | relURL }}?{{ .Site.Params.theme_seconds }}">
<link rel="me" href="https://micro.blog/{{ .Site.Author.username }}" />
{{ with .Site.Params.twitter_username }}
	<link rel="me" href="https://twitter.com/{{ . }}" />
{{ end }}
{{ with .Site.Params.github_username }}
	<link rel="me" href="https://github.com/{{ . }}" />
{{ end }}
{{ with .Site.Params.instagram_username }}
	<link rel="me" href="https://instagram.com/{{ . }}" />
{{ end }}

<link rel="authorization_endpoint" href="https://micro.blog/indieauth/auth" />
<link rel="token_endpoint" href="https://micro.blog/indieauth/token" />
<link rel="micropub" href="https://micro.blog/micropub" />
<link rel="microsub" href="https://micro.blog/microsub" />
<link rel="webmention" href="https://micro.blog/webmention" />
<link rel="subscribe" href="https://micro.blog/users/follow" />

{{ range .Site.Params.plugins_css }}
	<link rel="stylesheet" href="{{ . }}" />
{{ end }}
{{ range $filename := .Site.Params.plugins_html }}
	{{ partial $filename $ }}
{{ end }}

Next, add the below lines to the end of your base template, /_default/baseof.html just before </body>. These load the custom footer and the plug-ins defined JavaScripts.

{{ partial "custom_footer.html" . }}

{{ range .Site.Params.plugins_js }}
	<script src="{{ . }}"></script>
{{ end }}

Display Replies as Conversations

Micro.blog allows including replies made on the posts to be shown as conversations on a post page via a design setting (Design → Include conversation on post page). However, for the replies to be rendered on your post page, you need to modify your single template, /_default/single.html or posts/single.html, and add the below lines at the end.

{{ if .Site.Params.include_conversation }}
	<script type="text/javascript" src="https://micro.blog/conversation.js?url={{ .Permalink }}"></script>
{{ end }}

Summary

The difficulty involved in porting a Hugo theme to Micro.blog depends completely on the complexity of the original theme. Though it is difficult to extensively cover all the changes required, fixing the things that are broken and adding support for the Micro.blog specific features and tags is all it takes. This article attempted to list down the majority of the identified changes.

In the future, the way of including the Micro.blog specific changes may be simplified significantly. This article would be updated accordingly to reflect the same. However, the awareness of the changes being done allows one to appreciate the hidden complexity and beauty of the platform that is Micro.blog.


PS: This post was written for, and is also published at Custom by Miraz Jordan - a website that intends to “develop reference information and tutorials to help people customise themes in hosted Micro.Blogs”.