Skip to main content

4 posts tagged with "vercel"

View All Tags

Improved: Count Docs Posts in Docusaurus Including Folders

· 2 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 docs 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 docs posts are plain .md or .mdx files in the docs/ directory.

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

Improved: Count Blog Posts in Docusaurus Including Folders

· 3 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

· 3 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.