Custom Home and Blog Pages

So, I’m working on micro.blog as a full website with blog. It’s at https://johnan.micro.blog/ while I wait for the custom domain to point at it.

I want a custom Home Page and a page called Blog. The custom Home page is easy enough, but it’s really messy trying to set up an alternative page called Blog that will replicate what the built-in micro.blog index page does (ie display the blog posts).

I’ve searched and researched in the help pages and forums, but nobody seems to have come up with a tidy solution for this. The threads kind of just fizzle out.

My quick and dirty workaround is to make a new page called Blog and just redirect it to https://johnan.micro.blog (ie the index page). It works, but it’s noticeable that when I click on ‘Blog’ in the menu, the whole page refreshes, including the header and stuff (rather than having the header stay put while just the content changes, which is how the other menu buttons work). I don’t know if there’s a way to change this behaviour with the Blog button.

Is it possible that a better way to do the alternative-Blog-page exists, and I’ve just managed to miss it in Help?

Thanks heaps,
John

1 Like

As far as I know, you have to build a custom template in your theme for a new page that’s a list page for your blog.

Because every theme has a unique index template, it’d be hard to make that a plug in.

1 Like

Thanks, @jsonbecker :slightly_smiling_face:

The coding is beyond me, so quick and dirty will have to do for now. But one day, maybe I can figure it all out.

Have a good one :+1:
John

I think Manton made a plugin for this. GitHub - microdotblog/plugin-custom-homepage: Replaces your blog home page with text instead of recent posts
I followed some esoteric advice i found somewhere for https://failingtofall.com where i used tags to only display certain things on the home page. I am sure if you cast about you can find that somewhere.

Hey, thanks for replying.

Yes, I tried Manton’s custom home page, but then I couldn’t work out how to get the actual blog back, but on another page.

I had a look at Failing to Fall. I like your poems a lot. And the whole neurodivergent thing. I get that.

I’ve been thinking about updating the “Custom home page” plug-in to also create a listing of recent blog posts at something like “/blog”. That should be possible and hopefully will be a good default that can be customized with a theme.

That would be a wonderful solution, @manton

It’d be good if this took whatever the content of layouts/index.html is and moved it to that … though that also makes for a very complex uninstall process. But that’s the only way to get theme-consistent blog lists.

I do think it would be cool :slightly_smiling_face:

Why would it complicate the uninstall process, @jsonbecker? (I know, it’s probably obvious to someone who understands the inner workings of micro.blog, and I hope never to have to do any major uninstalling.)

Plug ins are additive right now, adding additional layouts and elements to your blog that they own, and then remove those elements when uninstalled. There’s no overlap really. A “move a file you have” on install and uninstall is a very different process.

Hmm … Okay. Well, I’ll stay away from uninstalling. if I can. Fingers crossed.