@stackbit/stackbit-pull

0.5.1 • Public • Published

stackbit-pull

Stackbit pull, is a build tool that fetches data from CMS using Stackbit's API and prepares it for SSG build.

Usage:

Usage: stackbit-pull [options]

Options:
  --stackbit-pull-api-url <stackbitPullApiUrl>  [required] stackbit pull API URL
  --stackbit-api-key <stackbitApiKey>           [required] stackbit API key, can be also specified through STACKBIT_API_KEY environment variable
  -h, --help                                    output usage information

Examples

Using npx:

npx @stackbit/stackbit-pull --stackbit-pull-api-url=https://api.stackbit.com/pull/<stackbitProjectId> --stackbit-api-key=...

Using STACKBIT_API_KEY:

export STACKBIT_API_KEY=...
./stackbit-pull.js --stackbit-pull-api-url=https://api.stackbit.com/pull/<stackbitProjectId>

Using local json file:

If you have a local json file with the following structure already downloaded,

[
  {
    "filePath": "src/pages/posts/post-1.md",
    "urlPath": "posts/post-1",
    "data": "---\nstackbit_url_path: >-..."
  },
  ...
]

then you can skip the network step by using the following command (no need to provide STACKBIT_API_KEY in this scenario):

npx @stackbit/stackbit-pull stackbit-pull-local-json --json-file=/path/to/your/json/file.json

Readme

Keywords

none

Package Sidebar

Install

npm i @stackbit/stackbit-pull

Weekly Downloads

2

Version

0.5.1

License

MIT

Unpacked Size

6.67 kB

Total Files

5

Last publish

Collaborators

  • bwwhite
  • bob_netlify
  • noahcrowley-netlify
  • greglobinski
  • seancdavis
  • merlyn_at_netlify
  • cmparsons
  • suzanneaitchison
  • ryanbonial
  • stackbitjoe
  • arseny.gurevich
  • smnh
  • tomasb
  • rodikh
  • berdav
  • stackbit-admin
  • vitaliyr
  • denar90
  • youvalv