So I have this wacky idea - someone may tell me a better way. Please do!
I am wanting to dump a new “thing” (usually a weblink and some text) as a micro blog item as I come across them… Then once a month subscribers get my linked-list of things. Makes sense?
I dont want this list of “things” being seen in my micro blog. It should be maybe on a seperate page - or maybe even - nowhere.
So do I have to do my own theming to do this is or is there a better way?
This would have to be an edit to your existing theme currently. It’s a little tricky to do, but a pretty minor adjustment just to the part that says “get all the posts and paginate them” to exclude a category.
Thanks @jsonbecker - I thought that may be the case
I think another way I could achieve the same thing (maybe better idea) is to use the bookmarks feature and categorise all these “things” with the correct tag… I dont think there is a natty newsletter option to make an email from these tags but thats ok… any better ideas welcome!
I have a question that seems directly relevant to the question that was asked by the OP several months ago. If this should be moved to its own distinct post, please let me know.
I am trying to exclude all posts with the category hide from my blog’s homepage. I am not trying to exclude it from my RSS feed or the timeline. I just want to hide it on my blog. I have read other help posts and my general understanding is that it should be possible to exclude a post in this way. I have duplicated a Micro.blog theme (Sumo) so that I can make edits. And my understanding is that I may need to edit one of these two files (maybe others?) to make this happen:
layouts/_default/list.html: Used for section and taxonomy pages (collections of content). layouts/index.html: Used exclusively for the homepage.
Before I go any further, I would appreciate any guidance that anyone might be able to provide about which file(s) in my custom template should be edited. I really want to achieve this capability. But my knowledge of Hugo is limited. I’m trying to learn!
Sumo has a feature its author invented called Microhooks. I’d actually use this Microhooks
But you also could simply use the layouts/index.html page. The only thing is /categories/hide will still exist on the web and you may be able to see the hidden posts on your archive page. I’m not 100% clear on that. I think the micro hook will remove it all places both methods are feasible.
If you search there are many topics where people ask about hiding categories.
Thank you @jsonbecker! I appreciate your reply. You got me to go back and review some of the of the posts on this topic that I’d saved. In one of them, you described excluding certain categories from my homepage and archive. And my understanding is that I would need to edit these files in my custom theme to do that.
But I can’t seem to find an example of having successfully done this with either Sumo or Tiny themes.
I appreciate your suggestion to explore microhooks, which seem promising. But I’m having more success slowly building my understanding of how the Hugo code works, which is not saying much I guess.
Yes, I did see @pratik’s example (helpfully written up at the Tiny Theme Tutorial page) and have tried to follow it but I’m a few steps behind in understanding how to do this. It also seems to involve microhooks which I’m still wrapping my head around.
I confess, that I have been making liberal use of ChatGPT, in my efforts to understand what’s going on. None of these have worked when I’ve attempted to make changes to layouts/index.html that would exclude posts based upon category yet. But using it to explain the code, line-by-line, has been helpful to a novice like me.
You don’t have to use microhooks if you want to only exclude posts from a specific category on your homepage. You will have to categorize the “things” posts with a specific category though. Simply plop these three lines at the top of your homepage code:
Replace “Linking Park” and “Now” with your category or categories that you want to exclude. Posts with these will still be on blog but not on your homepage. It can be on its own category page.
For the newsletter, if you want to send only posts with these “things”, you can set it up in the Newsletter settings on Micro.blog.
Thank you @pratik. I just tried placing the three lines you provided at the top of my layouts/index.html page, changing the two categories you provide for a single category hide.
If I am only including one category (i.e., hide) should the second line of your code be edited in other ways? Does intersect need to be edited/removed?
Thank you @jsonbecker. You have been a great help.
I will try to see what I can do. I’ve made a few lunchtime attempts to use ChatGPT to accomplish hiding posts with the category hide on the archive page. One attempt hid all the posts, including those in categories I wanted displayed. Others resulted in no apparent changes.
Hi @willtmonroe - were you able to accomplish this with your archives as well? I was able to do this successfully with my homepage and wanting to remove the same category from my archive. Thanks!