Question on how to apply Microhooks in Tiny Theme

I’m not a coder. I’ll generously describe myself as dangerously competent. I am using Tiny Theme and would like to use the microhook-post-list.html to enable automatic post truncation. Do I just create a new template and enter that microhook into the body? It’s not made clear in the docs. Any assistance is appreciated.

Source of information is here. Microhooks

You have to create a new file layouts/partials/microhook-post-list.html and it has to contain everything that would be the post list in a Hugo template.

It replaces everything from line 6 to 55 here with whatever you put in that partial.

1 Like

Have you tried just putting a “< ! - - m o r e - - >” token (spaced out so it doesn’t get eaten by the forum software) into your post and see if it truncates? I’m using the Sumo theme which is based on the Tiny theme, and it just works without having to do any microhooking. :wink:

1 Like

Ah, yes. I should have posted an update. I’ve started doing that. I was originally going to try to get auto-truncating to work, but it seems out of my depth, so I just started editing the posts I imported from PostHaven instead. The HTML from PostHaven is kind of a mess and the Posts listing in MB is… unhelpful, but I’ve been working through them. It is working now.

Thanks for reminding me to follow-up :smiley:

Also, Discourse can handle code with the </> button above or just ticks (under the tilde):

<!--more-->

You can either truncate all posts after a certain limit by using the summary tag (in the template code) or some of the posts by using the more tag (in the post)

Thanks! If you could point me to a resource that explains that or give me a quick “summary” :smile: of how I might apply that in Tiny that would be great. I know how to enter the more tag in a post, but I’m not yet familiar with the way code works in the themes. I might never be :rofl:

If you’re on a Mac, I recommend MarsEdit for better search/filtering and editing of long posts.