Improved: Count Docs Posts in Docusaurus Including Folders
🔄 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.