Skip to main content

2 posts tagged with "blog"

blog tag description

View All Tags

Improved: Count Blog Posts in Docusaurus Including Folders

· 4 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

🔄 Update to: Count Number of Blog Posts in Docusaurus and Vercel

In my previous post, I shared a method to count the number of blog posts in a Docusaurus project and display it on your homepage, fully compatible with Vercel and static builds.

That method works great-if all your blog posts are plain .md or .mdx files in the blog/ directory.

But if you're like me and prefer organizing blog posts in folders (e.g., blog/my-post/index.md), the previous approach silently misses those.

How to Display Blog Post Count on Docusaurus Homepage

· 4 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Many developers using Docusaurus want to display the number of blog posts they have-especially on their homepage. While this may sound trivial, doing it the right way (that works on both your local dev and production builds like Vercel) requires some thought.

Here's a simple and reliable way to implement this-no hacks, no unstable APIs, just clean engineering.