
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
gatsby-post-manager
Advanced tools
[](https://www.npmjs.com/package/gatsby-post-manager) [](https://travis-ci.org/steven-mercatante/gatsby-post-
Gatsby Post Manager (gpm
) is a command line tool that:
$ npm install -g gatsby-post-manager
gpm
is opinionated - it assumes your posts:
.md
or .mdx
file extensionspublished
boolean flag in their frontmatterdate
attribute (format: YYYY-MM-DD
) in their frontmattergpm
will recursively search the provided content path (the --dir
option) for posts.
Below is my example directory structure. All gpm
commands are invoked from the site
root.
site/
├── content/
│ ├── posts/
│ | ├── my-first-post/
│ | | └── index.md
│ | ├── my-second-post/
│ | | └── index.mdx
│ | └── my-third-post.md
$ gpm -d content posts
# or
$ gpm -d content p
status
is one of: published
, pending
, or unpublished
# status flags: --published, --pending, --unpublished
$ gpm -d content posts --pending
# or
$ gpm -d content p --pending
published
if its published
attribute is true
, and its date
attribute occurs before or is equal to today's date (if the post has a date
attribute)pending
if its published
attribute is true
, and its date
attribute occurs after today's date (if the post has a date
attribute)published
if its published
attribute is true
, and it does not have a date
attributeunpublished
if its published
attribute is not true
, or doesn't have a published
attribute at all$ gpm -d content post-stats
# or
$ gpm -d content ps
$ gpm posts new path/to/posts "hello world"
will create a new path/to/posts/hello-world.md
file whose frontmatter looks like:
---
title: Hello World
slug: "hello-world"
tags: []
published: false
date: "2019-09-23"
---
Add your content here
FAQs
[](https://www.npmjs.com/package/gatsby-post-manager) [](https://travis-ci.org/steven-mercatante/gatsby-post-
We found that gatsby-post-manager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.