Linktree-style page

Sorry, I don’t understand. Currently my blog is at ‘microblog.pratikmhatre.com’ and I want the page I describe above to be at this domain while being fed contents (widget-style) from other parts of my microblog with blogposts being a big part of that page (showing posts just for Today in chronological order).

All I’m saying is “you can make a page anywhere on microblog.pratikmhatre.com that does exactly what you describe”. Now if you want it at a different subdomain, you cannot use this feature, as this is building a completely different website for you that does not share content with the other blog.

But if you wanted microblog.pratikmhatre.com/now or microblog.pratikmhatre.com/today to function like this, you can.

You just can’t do today.pratikmhatre.com or now.pratikmhatre.com

(note, you could do a DNS-level redirect from those subdomains though).

Got it. Yup! Was asking this. I thought since it’s the same account the two blogs could probably talk to each other.

It’s true that each site will have its own data, but I just thought of a work-around… You could use the Sidebar.js feature to show the most recent posts across your account and embed them in a new “now” subdomain.

See the help page here: ℹ️ JavaScript include with Sidebar.js

You can actually paste this snippet of JavaScript directly into the settings text box with the “Custom home page” plug-in, so no custom theme is needed.

And make sure to add &count=5 at the end to just include the latest five posts.

3 Likes

That is so cool! Thanks for sharing.

So, to clarify, I don’t need the newly-introduced stand-alone site feature but with my current blog, I should simply instead the Custom Home Page plugin and use JavaScript code above to show the five recent posts. Is the custom home page a stand-alone page to which you can add other elements?

You could use that JavaScript on the new feature— it lets you embed posts from your blog on a completely different website. Or you could just edit your regular home page template to show five posts. Changing the number of posts you show per page or how they’re laid out is a basic Hugo feature. You can set it to 5 in your configuration to change it everywhere or on the call to .Paginate on your index page. The Hugo docs show lots of
options: Pagination | Hugo

Just chiming in to agree with @jsonbecker…. Sidebar.js is designed to bring recent blog posts to a separate web site (either hosted externally, or using this new single-page site option). Because it uses JavaScript, it’s not as good as editing a Hugo template if you have everything on the same blog.

3 Likes

I am wondering if I can use Sidebar.js to display posts from a particular category from my Micro.blog. Is this possible?

3 Likes

It’s not possible, but that’s a good suggestion. We’d need to add some kind of category parameter.

3 Likes

Thank you that would be really useful for me to use in my single page sites.

include or exclude certain categories…

2 Likes