Custom Page Template

micro.blog doesn’t really use pages, everything by default is a post. If you want a custom template, I recommend doing layouts/$custompagename/single.html for your template, and then create content/$custompagename.md for your content in your theme, putting the type: field in the front matter set to custompagename

29 November 2022

New page at How to customise Micro.Blog: How to help:

The purpose of this blog is to help people customise their hosted Micro.Blogs. You could:

  • write new tutorials
  • link to useful info
  • update existing tutorials or other posts
  • improve the website itself

Are you in?

Anatole – A Two-column Theme

Ever since I published the Paper theme to Micro.blog, I wanted to port one with multiple columns and yet stay minimal as possible. I’ve found one, and today I managed to port it to and customize it for Micro.blog. The theme, called Anatole, is a beautiful minimalist two-column theme.

The theme is available in Micro.blog’s Plug-ins directory and can directly be installed from there. Note that the theme is compatible with Hugo 0.91, which is available as a setting on Micro.blog.

Anatole – A Two-column Theme for Micro.blog amitgawande.com

Update, 17 October 2022:

I’ve pushed an upgrade v1.0.1 for Anatole theme today – it fixes a few minor issues with the categories on the archive page & images on smaller screens. The theme now also supports mastodon profile in the social links list.

[- Excursions](https://www.amitgawande.com/2022/10/16/ive-pushed-an.html)

Tips for hosting a Single Page on Micro.blog

From the Micro.blog Help Center — Hosting a single page on Micro.blog.

In response to the query I want to host a static page for an event on my Micro.blog. But I’d like the page to be standalone, @Sod replied:

One way to host static HTML pages (or any file) is to put them in the static directory. For example, say you have a file on your computer called event.html, and you want to host it on your Micro.blog. Create a new template named static/event.html and paste the content there. The page will be reachable at your.micro.blog/event.htm…

If you want a prettier and shorter URL without the .html file ending, you can name the template static/event/index.html instead. Then, the URL will end up your.micro.blog/event/.

Micro.blog Family and theme parameters

Micro.blog Family - Hosting on Micro.blog - Micro.blog Help Center:

Theme parameters

The Marfa design has a place in the footer of each post that shows the author of that post. Other custom themes may need modifications if you want to include author information.

Micro.blog adds the following Hugo parameters when processing your blog:

  • .Params.author.name
  • .Params.author.username
  • .Params.author.avatar

If the blog is not a team blog, these parameters will be blank. You can check whether the author is available, and then fall back on the blog’s default author:

{{ if .Params.author }}
  <p>{{ .Params.author.name }}</p>
{{ else }}
  <p>{{ .Site.Author.name }}</p>
{{ end }}
Screen Shot of text.

Use Google Fonts by adding a font reference to the CSS

To a question in the Micro.blog Help Center — Can I use Google Fonts with a custom theme?, Manton replied:

Yes, you can use Google Fonts by adding a font reference to the CSS. In Micro.blog, click on Design → Edit Custom CSS and paste in the CSS that you get from Google. It will look something like this:

@import url(‘https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap');

body {
font-family: "Roboto";
}

Do customised themes get updates?

From the Micro.blog Help Center, Do M.b updates to theme files extend to untouched files in custom themes?:

Q: I am wondering if people who set and edit a custom theme from a particular existing theme get updates to the files they haven’t edited when, say, Manton makes changes to the theme itself, or if you’re basically “stuck” with whatever versions of those files existed when they created the custom theme?

A: Yes, updates to the original theme will come through.

Plugin: Home page photos

Manton says on 24 July 2022:

Hello, photo bloggers! I created a new plug-in that replaces your home page with a grid of photos and links for your other pages. No post text on the home page. Hope it’s a good start for people who want to go all-in on photos. Called simply “Home page photos”.

Update — a question: Can I customize the theme like any other theme? I want to remove the "Follow at Micro.blog" links.

The answer: You can hide that with CSS... Paste something like this in Design → Edit CSS: .me .description { display: none; }

Plugin: Font Awesome icons

I made a Micro.blog plug-in that loads Font Awesome in your blog, so it’s easier to add icons to blog posts or to use them in theme templates.

Update, 01 July 2022:

After I made the Font Awesome plug-in, I recorded a video about using it, including how Micro.blog themes work. There was a caching bug in the video, so wanted to re-record it after fixing it… But I don’t have time, so posting the video anyway! Enjoy, it’s on YouTube here.