Link: Developing plug-ins for Micro.blog
The official word from Manton: Developing plug-ins for Micro.blog:
Plug-ins are like lightweight Hugo themes. They can provide all the templates needed for a custom theme, or they can provide just a couple templates, overriding any templates in a built-in design on Micro.blog. Micro.blog applies the plug-in templates after the blog’s theme has been set up.
Link: The Kiko Micro.blog Theme Refined: "Kiko: System"
Kahlil Lechelt modified the Kiko theme to use the system font depending on the OS the page is being viewed on. The mod also refined the home page layout
.
Thanks to @Gabz whose post Kiko in the dark? linked to this.
Some big changes for this site: teams and plug-ins
On 06 May 2020 Manton announced Micro.blog for teams: multi-user blogs, so your whole team can write posts on a shared blog.
And now, Custom.micro.blog, has been upgraded. So, here's an open invite to anyone who feels they can contribute, to contact me at miraz@firstbite.co.nz .
Also, on 07 July 2020 Manton announced plug-ins for Micro.blog:
a plug-ins system for Micro.blog that formalizes a lot of the power of Micro.blog themes, but wrapped in a package that is easier to develop and install. Instead of creating a custom theme for your blog and editing the templates yourself, you might be able to find a plug-in that will add the feature. Unlike custom themes, there can also be multiple plug-ins installed for a single blog.
Since plug-ins are directly relevant to customising a blog I'm hoping to make this site a resource centre for plug-ins and plug-in developers.
I'm also always looking for more folks to contribute tutorials, how-tos or just links to helpful resources.
Let's pool our knowledge and make a fabulous resource for anyone wanting to tinker with their Micro.Blog.
I also need to thank Manton for his generosity in making this site free! 😀
Link: Plug-ins for Micro.Blog
BIG news today — Plug-ins for Micro.Blog:
Instead of creating a custom theme for your blog and editing the templates yourself, you might be able to find a plug-in that will add the feature. Unlike custom themes, there can also be multiple plug-ins installed for a single blog.
Link: Redesigned theme editor for Micro.blog
Redesigned theme editor for Micro.blog
MAY 19, 2020I’ve redesigned the theme text editor in Micro.blog, adding a preview pane and other improvements. It now features a split view with the template on the left and your web site on the right.
Source: Manton Reece - Redesigned theme editor for Micro.blog.
Link: Custom 404 page
Some themes include a custom “404 not found” page when a visitor to your blog tries to request a page that is no longer on the web, or if they mistype a URL. You can override this page in 2 different ways:
- The easiest way is to create a new Micro.blog page under Posts → Pages. For the title, type “404” and save the page. Micro.blog will notice that special title and automatically set up the page filename to be
/404.html. You can later edit the title or text content to anything you want.- If you need more control, use a custom Micro.blog theme to add a new template in
layouts/404.html. This can use any Hugo includes to show headers, footers, or handle other logic.When neither of these pages are found, Micro.blog will return a basic “Not Found” page.
Source: Custom 404 page - Micro.blog Help.
Link: Help page for Teams includes theme tips
I’ve added a help page for teams in Micro.blog. Includes details on the Hugo parameters for adding author names to custom themes.
Source: Manton Reece.
Extract from the help page for teams:
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.
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. …
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 …
List posts chronological within a day
From Jason Becker json on Slack (07 April 2020):
… here’s a template snippet from my layouts/index.html that will allow your posts to be listed in reverse chronological order by day, but within a day be in chronological order. Which I quite like.
{{ $posts := where site.RegularPages “Type” “post” }} {{ $grouped := $posts.GroupByDate “2006-01-02” }} {{ $paginated := (.Paginate ($grouped)) }} {{ range $paginated.PageGroups }} {{ $thedate := (time .Key) }} <h1> {{ $thedate.Format “January 02” }}</h1> {{ range .Pages.Reverse }} {{ if eq .Type “post” }} {{ .Render “summary”}} {{- end }} {{ end }} {{ end }}
Link: Excluding posts from the timeline
We can leverage categories to build this feature of picking which posts should appear in the timeline.
Link: Help page for Replies with Conversation.js
Replies with Conversation.js - Micro.blog Help.
this is not just about taking Micro.blog-only replies and putting them on your blog. … it now becomes much more useful for other blogs to send you replies. Those replies can appear on your blog, with Micro.blog mostly acting as glue so that both blogs can talk to each other.
Link: Replies on your blog with Conversation.js
…a new feature for Micro.blog that I’m calling Conversation.js. It’s a JavaScript include that lets you take a conversation on Micro.blog and drop it into your blog.
Like a lot of Micro.blog features, it works either as a simple feature you can enable with a click, or as a more advanced API that can be customized however you’d like.
Source: Manton Reece - Replies on your blog with Conversation.js.
Link: Easier Micro.blog podcast cover art
There’s a new feature on Micro.blog under Posts → Design that lets you change the cover art [for a podcast]. … Click the existing cover art to select a new image from your uploads.
Link: Dark mode for Marfa
FWIW, if you’re using Marfa … right now this is giving me a decent-enough quick-and-dirty “dark mode” theme in Chrome and Firefox and Safari.
@media (prefers-color-scheme: dark) { body { filter: invert(100%); } img { filter: invert(100%); } body { background-color: #000!important; } }
Link: Using GLightbox with custom Hugo shortcodes on Micro.blog
I decide … write a custom Hugo shortcode to support using GLightbox. Custom shortcode? Shortcode? If you’re not familiar with this part of Hugo, the static site generator that powers Micro.blog under the hood, well you’re not alone. A shortcode is a Hugo-specific extension to your Markdown posts so that using a specific syntax you can dynamically create complex HTML content.
Source: Using GLightbox with custom Hugo shortcodes on Micro.blog.
Link: Adding Webmentions To micro.blog
Link: Adding Webmentions To micro.blog
I’ve been working to … add webmentions rather then comments like Disqus. Webmentions are coming to MB at some point … I didn’t want to wait though … I’m going to try and document exactly what I did through this post.
Link: The core parts of Micro.blog :
The core parts of Micro.blog are Ruby, MySQL, Redis, with Hugo + Nginx for serving hosted blogs. Split across 5 servers, plus the new photo storage. Also S3 for a couple things, but may migrate that away too.
Manton Reece: 03 December 2019.
Link: How to Add Dark Mode to your Custom CSS
if someone is in dark mode, you may want to have your website automatically switch them to a dark theme, so you’re not unexpectantly blasting them with white light when they’re not expecting it.
Link: Lanyon theme on Micro.blog:
It’s a clean, readable design with a slide-out menu for page links.
Link: Swarm check-ins and Micro.blog:
When a post has location information, you can see the coordinates in the posts list on your account
default Micro.blog themes do not currently do anything with this info… create a custom theme to access coordinates as custom parameters
Link: Changing Your Site Logo in Dark Mode
Changing Your Site Logo in Dark Mode
I have a logo at the top of my blog … it looks great on a white background! In dark mode, however, it looks really bad.
I turned to our old friend, CSS, to get me through this problem. First, I created and uploaded two versions of my logo: a light mode version and a dark mode version.
Now all I had to do was add the Custom CSS to overwrite the light mode logo hard coded into the HTML in the theme files with the dark mode logo.
Link: free Micro.blog test blogs
Micro.blog now lets you create a free test blog for your account with a URL like username-test.micro.blog. There’s a button to create the test blog under Posts → Design → Edit Custom Themes. It will appear as a free 2nd blog on your account, and you can post to it, upload files, or try out custom themes.
Link: Search engine indexing
As of 21 August 2019 Micro.Blog automatically adds a robots.txt
file to each hosted site: Search engine indexing.
Disabling or customizing your robots.txt file.
If you’d like to disable generating the robots.txt file, you can override it with a custom theme. …
You can also add custom rules to the robots.txt file.
Link: Dark Mode for the Marfa Theme on Micro.blog
With iOS 13 and macOS Catalina, you can enable Dark Mode on your devices. … you can enable Dark Mode on your own site. It’s suprisingly simple. … All the code is doing is turning the background black and the text white.
Link: CSS I added to the Hello theme
CSS I added to the Hello theme, by Ricky de Laveaga.
CSS I added to the Hello theme, the only dark theme in the micro.blog theme gallery. It even has a light/dark switcher!
Link: Changing the default colors of the Micro.blog Marfa theme
Micro Guide: Changing the default colors of the Micro.blog Marfa theme, by Roel Willems
I really like the [Marfa] theme but wanted to give it a small personal touch by changing the default color for links.