Linking to first page of blog posts from custom home page

Hi, I’ve been playing around with implementing a custom home page, by following this help topic, but there’s something I’m not understanding: how can I link from there to my normal page of posts?

Say I make a welcome page, but I want people to be able to click through to my pages of blog posts; if I include a link to domain.name/page/2 it links to the second page of my blog, but domain.name/page/1 seems to send me back to the custom home page, not the first page of blogposts as intended.

(All help appreciated. I’m prepared to delete this topic in a heartbeat if I’m missing something super obvious!)

1 Like

Yes, I’m finding this too - the custom index.html Is overriding domain.name/page/1.

I cannot see a way to access my first page of posts - the Previous page link from my second page also (obviously) just takes me back to the custom home page.

Anyone know a way round this?

1 Like

I’d like to use the custom home page option too, but I want to be able to link to my posts. Has this question been answered yet anywhere else?

Thanks! :slight_smile:

1 Like

I have this question too.

By overriding the home page, the first page of posts is ‘missing’, but page 2 is ok. How do I show page 1 posts?

Thank you

1 Like

have you tried /posts/ ? My understanding is this will render the layouts/_default/li.html layout for any content of type “post” which all content in Micro.blog is, technically. You might not have that in your theme, as I don’t think Micro.blog provides that template as a default in most of its themes, but you can replace what was on the index page there and I think it’ll work.

1 Like

Thank you. That doesn’t work on my blog unfortunately

I did actually attempt to make a short intro of text that would only appear on the front page, above my posts. As I think this would be a suitable alternative for me.

I was able to follow these instructions but it garbled my home page in weird ways I didn’t expect.

I don’t know much about this kind of stuff so I’m a bit lost.

which theme are you using?

1 Like

Hi, thank you. It’s Tiny theme by @Mtt

Ah I see. Micro.blog does not put posts in content/posts/ but just uses the type in the front matter. I think I know how to help you do this but it’s a bit complex. You’ll have to create a new layout for a new type (like say, blog) then create a blank page with that type.

To get this just like Tiny:

  1. Create your custom theme.
  2. Add a file at layouts/blog/single.html.
  3. Paste this content in there: https://github.com/MattSLangford/Tiny-Theme-for-Micro.blog/blob/main/layouts/index.html
  4. Make a new file in your template called content/blog.md
  5. The full content for that page should be:
---
title: Blog
type: blog
---

Link on your custom home page to https://aeryn.micro.blog/blog/.

Thank you Jason for helping out.

I have followed your instructions but am receiving an error on the Design page:

Theme error: Error building site: failed to render pages: render of “page” failed: “layouts/blog/single.html:5:27”: execute of template failed: template: blog/single.html:5:27: executing “main” at <.Paginator.Pages>: error calling Pages: runtime error: invalid memory address or nil pointer dereference

Can you paste exactly what’s there? That’s hard to parse bug that could be transient, but there may be something weird in the specific code.

1 Like

Same question here. Also using Tiny Theme.

I don’t understand what you are asking me to paste. Is it about line 5, position 27?

Line 5 is

        {{ range .Paginator.Pages }}

The whole of layouts/blog/single.html is a copy/paste of the code from https://github.com/MattSLangford/Tiny-Theme-for-Micro.blog/blob/main/layouts/index.html

Thank you for helping. I’m sorry, but I’m a bit out of my depth with troubleshooting. Maybe I have misunderstood your earlier pointers to set it all up?

1 Like

Try ``{{ range $paginator.Pages }}`. Otherwise I’m not quite sure.

1 Like

I have tried this but I am getting the same error message. Thanks anyway :smiley: