The sidebar appears twice, does anyone know why?

I’m using the Sidebar for Tiny Theme by @lmika on two different blogs, eilloh.net and hollieskitchen.eilloh.net. It’s a great addition, thanks Leon!

In both blogs I did the same things for set-up, but on eilloh.net, the sidebar content appears both in the sidebar, but also at the bottom of the page, below the bottom most post and above the footer.

Is it clear to anyone why this would happen? I’m not a coder and I don’t know how to build a Hugo site on my own, but I’ve checked the Hugo files and I can’t see anything obvious that would cause this?

Hi @hollie,

Thanks for checking out Sidebar for Tiny Theme.

I’ve taken a look at your site, and I’m wondering if you still have {{ partial "sidebar.html" . }} in the microhook-after-post-list.html.

This was indeed how to get sidebar originally, but from version 2.7.4 of Tiny Theme and version 1.1.1 of Sidebar From Tiny Theme, this partial is no longer required. In fact, that version of the plugin has it’s own {{ partial "sidebar.html" . }}, which, if you’ve recently upgraded to these versions of the plugins, is probably why the sidebar is being included twice.

If you do have a {{ partial "sidebar.html" . }} in the microhook-after-post-list.html, please try removing it and seeing that resolves the issue. Otherwise, I can take another look.

Thanks,

Leon

1 Like

Hi @lmika,

That would definitely make sense! I’m pretty sure I was tinkering with a sidebar option before the plug-in. So when I read your response, I assumed that had to be it.

However, when I go into the Design to edit, I can’t find a file called microhook-after-post-list.html.

That’s what I should be looking for, right? A filed called microhook-after-post-list.html, and then I’d find that, and take out the {{ partial "sidebar.html" . }}, isn’t that what you’re describing?

I don’t know how to fix this if I can’t find the file? I’m not saying you’re wrong though, like I said, I do remember tinkering with that. And with my newer blog, I didn’t tinker, I just used your plugin, so that would explain why I have the problem on my old blog and not on the new one. But what do I do if that file isn’t there?

Thank you!

Hi @hollie,

That’s what I should be looking for, right? A filed called microhook-after-post-list.html, and then I’d find that, and take out the {{ partial "sidebar.html" . }}, isn’t that what you’re describing?

Yes, that’s correct. That was how the sidebar was originally added to the site.

Hmm, I’m wondering if it’s a plugin version issue. Can you let me know which versions you currently have for “Tiny Theme” and “Sidebar for Tiny Theme”? Also, can you check the version of Hugo is currently set in the “Design” section?

If you feel up to it, you can try upgrading these plugins to the latest version, or at least the “Sidebar for Tiny Theme” plugin. It looks like you’ve made a few customisations on your site so if you rather not do that, then that’s fine.

Don’t worry. We’ll find out what’s going on here. :slightly_smiling_face:

Thanks,

Leon

1 Like

Hi @lmika,

Thanks so much for your continued help!

  • Hugo is version 0.91
  • Sidebar for Tiny Theme is 1.1.1
  • Tiny Theme is 2.8.5

They all seem to be up to date, i.e. there isn’t an option to update any of them (I generally check for updates every month or so).

Thanks again!

Hollie

Hi @hollie,

Okay, probably the next thing I’d suggest trying is uninstalling and reinstalling the Sidebar for Tiny Theme plugin and seeing if that removes the bottom sidebar. I’m wondering if one of the templates the plugin was using got stuck somewhere (it’s my first real plugin so I’m not sure how Micro.blog handles templates and version changes).

Maybe try uninstalling it first, and seeing if both the bottom and right sidebars are removed. Then installing it again and checking to see if only the right sidebar reappears. Let me know if the bottom sidebar is not removed when you uninstall the plugin, as it could mean some other templates are not being cleaned up properly.

Also make sure you make a backup of your sidebar configurations. It shouldn’t be removed when you uninstall the plugin but I’m not certain of that.

If that doesn’t work, then you can try hiding the sidebar by doing one of the following:

  1. You can create an empty “after-post-list” microhook by adding a new, empty template with the filename layout/partials/microhook-after-post-list.html.

  2. You can hide the bottom sidebar with this CSS:

div.page-content > div.wrapper > div.sidebar {
  display: none;
}

Thanks,

Leon

1 Like

Hi @lmika,

It worked! :slight_smile: When I installed it again, it was fine, there’s no repeated content on the bottom at all. I should have started out with this move, sorry about that.

Thanks so much for being so patient and helping me figure it out!

Oh hey @lmika can I ask one more question? Is there any way to get the sidebar to appear on EVERY page, not just the main blog page?

(No rush! Please take your time answering, I know the holidays are a busy time so no worries!)

Hi @hollie,

It worked! :slight_smile: When I installed it again, it was fine, there’s no repeated content on the bottom at all.

Oh good! I’m glad that worked.

I should have started out with this move, sorry about that.

All good. Nothing to be sorry about. :slightly_smiling_face:

Is there any way to get the sidebar to appear on EVERY page, not just the main blog page?

Not at the moment, but I think that should be easy to add. Let me work on that and I’ll get back to you.

Thanks,

Leon

Hi @hollie ,

I’ve released a new version of the Sidebar for Tiny Theme plugin: version 1.2.0. In this version, there are now two options that can be used to control which pages the sidebar will appear, in addition to the home page:

  • Pages from blog posts
  • Pages other than blog posts (About, Archive, etc.)

Enabling both options should get the sidebar to appear on all pages of the site.

If you can give it a quick test and let me know how it goes for you, that would be great. I’m pretty sure it will work but it’s always good having someone else taking a look at it.

Thanks,

Leon

1 Like

Oh wow, it works, and it’s so cool! This design is one that I used to love when I blogged ages ago, in the early 2000’s, and to have it back is such a total delight. And on Christmas too, that’s so kind! It’s a present. Thanks so much, Leon! :grinning:

My pleasure. Good to hear that it’s working well.

— Leon