DEV Community

Steven Mercatante
Steven Mercatante

Posted on โ€ข Edited on โ€ข Originally published at stevenmercatante.com

1 2

๐ŸŽ‰ Announcing Gatsby Post Manager

I use Gatsby for blogging and like to write a bunch of articles at once so I can release them over time. But, since I use flat files instead of a CMS, keeping track of my articles and their status (published, pending, unpublished) can get tricky - especially as the number of them grows. So, I built a tool to help manage them.

๐ŸŽ‰Introducing Gatsby Post Manager๐ŸŽ‰

Gatsby Post Manager (gpm for short) is a command line tool written in Node.js that makes it easy to track how many posts you have, as well as their status. It's meant to be installed as a global package so you can use it for any of your Gatsby sites.

$ npm install -g gatsby-post-manager

Currently, it has two commands: posts and post-stats. The project's README shows more detailed usage, but the gist is...

You can show all posts:

gpm-all-posts

Filter posts by a specific status:

gpm-pending-posts

Show a quick summary of post stats:

gpm-post-stats

gpm works by finding all of your markdown (including MDX) posts, parsing their frontmatter and determining their status, before rendering data to your terminal. The concepts behind gpm are pretty simple, and should be applicable to other static site generators.

If you've ever found keeping track of your Gatsby posts tricky, I hope you'll give Gatsby Post Manager a try.

๐Ÿ‘‹ Enjoyed this post?

Join my newsletter and follow me on Twitter @mercatante for more content like this.

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (1)

Collapse
 
chrisachard profile image
Chris Achard โ€ข

Neat! I don't have enough posts for this to be an issue for me yet, but when I get there, I'll check this out. Thanks :)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

๐Ÿ‘‹ Kindness is contagious

Please leave a โค๏ธ or a friendly comment on this post if you found it helpful!

Okay