{"id":15245080,"url":"https://github.com/stackbit/sourcebit-source-contentful","last_synced_at":"2025-07-26T12:40:16.437Z","repository":{"id":38993048,"uuid":"232304562","full_name":"stackbit/sourcebit-source-contentful","owner":"stackbit","description":"A Contentful source plugin for Sourcebit","archived":false,"fork":false,"pushed_at":"2023-03-05T05:47:12.000Z","size":613,"stargazers_count":13,"open_issues_count":11,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T14:44:36.443Z","etag":null,"topics":["contentful","headless","headless-cms","jamstack","sourcebit","ssg"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/sourcebit-source-contentful","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stackbit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-01-07T10:51:16.000Z","updated_at":"2025-02-11T14:05:42.000Z","dependencies_parsed_at":"2023-07-21T17:08:59.781Z","dependency_job_id":null,"html_url":"https://github.com/stackbit/sourcebit-source-contentful","commit_stats":{"total_commits":59,"total_committers":7,"mean_commits":8.428571428571429,"dds":0.4067796610169492,"last_synced_commit":"520f62c6b38edec39cbaf0786beca93934a9ea2f"},"previous_names":["stackbithq/sourcebit-source-contentful"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbit%2Fsourcebit-source-contentful","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbit%2Fsourcebit-source-contentful/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbit%2Fsourcebit-source-contentful/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbit%2Fsourcebit-source-contentful/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackbit","download_url":"https://codeload.github.com/stackbit/sourcebit-source-contentful/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248256302,"owners_count":21073502,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["contentful","headless","headless-cms","jamstack","sourcebit","ssg"],"created_at":"2024-09-29T13:06:21.961Z","updated_at":"2025-04-10T16:52:30.193Z","avatar_url":"https://github.com/stackbit.png","language":"JavaScript","readme":"# sourcebit-source-contentful\n\n[![npm version](https://badge.fury.io/js/sourcebit-source-contentful.svg)](https://badge.fury.io/js/sourcebit-source-contentful)\n\n\u003e A [Contentful](https://contentful.com) source plugin for [Sourcebit](https://github.com/stackbithq/sourcebit)\n\n## 👩‍🏫 Introduction\n\nWith this plugin, you can add Contentful as a data source for Sourcebit. To connect your Contentful account, you need a [Personal Access Token](https://www.contentful.com/r/knowledgebase/personal-access-tokens/).\n\n## 🏗 Installation\n\nTo install the plugin and add it to your project, run:\n\n```\nnpm install sourcebit-source-contentful --save\n```\n\n\u003e 💡 You don't need to run this command if you start Sourcebit using the [interactive setup process](#%EF%B8%8F-interactive-setup-process), as the CLI will install the plugin for you and add it as a dependency to your project.\n\n## ⚙️ Configuration\n\nThe plugin accepts the following configuration parameters. They can be supplied in any of the following ways:\n\n-   In the `options` object of the plugin configuration block inside `sourcebit.js`, with the value of the _Property_ column as a key;\n-   As an environment variable named after the _Env variable_ column, when running the `sourcebit fetch` command;\n-   As part of a `.env` file, with the value of the _Env variable_ column separated by the value with an equals sign (e.g. `MY_VARIABLE=my-value`);\n-   As a CLI parameter, when running the `sourcebit fetch` command, using the value of the _Parameter_ column as the name of the parameter (e.g. `sourcebit fetch --my-parameter`).\n\n| Property               | Type    | Visibility  | Default value                                   | Env variable                | Parameter | Description                                                                                                                                                                                                                                    |\n| ---------------------- | ------- | ----------- | ----------------------------------------------- | --------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `accessToken`          | String  | **Private** |                                                 | `CONTENTFUL_ACCESS_TOKEN`   |           | The Contentful Personal Access Token.                                                                                                                                                                                                          |\n| `deliveryToken`        | String  | **Private** | Created automatically via management API        | `CONTENTFUL_DELIVERY_TOKEN` |           | The Contentful [Content Delivery API](https://www.contentful.com/developers/docs/references/content-delivery-api/) Token.                                                                                                                      |\n| `previewToken`         | String  | **Private** | Created automatically via management API        | `CONTENTFUL_PREVIEW_TOKEN`  |           | The Contentful [Content Preview API](https://www.contentful.com/developers/docs/references/content-preview-api/) Token.                                                                                                                        |\n| `environment`          | String  | Public      |                                                 |                             |           | The name of the Contentful [space environment](https://www.contentful.com/faq/environments/).                                                                                                                                                  |\n| `host`                 | String  | Public      | The default value defined by the Contentful SDK | `CONTENTFUL_HOST`           |           | The value of the `host` option of the [Contentful SDK](https://contentful.github.io/contentful.js/contentful/7.13.1/).                                                                                                                         |\n| `preview`              | Boolean | Public      | `true` if `{watch: true}`, `false` otherwise.   |                             |           | Whether to use the [Contentful Preview API](https://www.contentful.com/developers/docs/references/content-preview-api/) as opposed to the [Content Delivery API](https://www.contentful.com/developers/docs/references/content-delivery-api/). |\n| `pollingInterval`      | Number  | Public      | `5000`                                          |                             |           | The interval of time (in milliseconds) between API calls to Contentful to poll for content changes. Only applicable when `watch` is enabled.                                                                                                   |\n| `projectId`            | String  | Public      |                                                 |                             |           | The ID of the Contentful [space](https://www.contentful.com/r/knowledgebase/spaces-and-organizations/).                                                                                                                                        |\n| `richTextOutputFormat` | String  | Public      | `html`                                          |                             |           | The format to convert rich-text fields to. Accepted values: `html` and `none`.                                                                                                                                                                 |\n| `watch`                | Boolean | Public      |                                                 |                             | `watch`   | Whether to poll Contentful for content changes.                                                                                                                                                                                                |\n\n### 👀 Example configuration\n\n_sourcebit.js_\n\n```js\nmodule.exports = {\n    plugins: [\n        {\n            module: require('sourcebit-source-contentful'),\n            options: {\n                accessToken: process.env['CONTENTFUL_ACCESS_TOKEN'],\n                environment: 'master',\n                spaceId: '1abcdefgh2ij'\n            }\n        }\n    ]\n};\n```\n\n_.env_\n\n```\nCONTENTFUL_ACCESS_TOKEN=CFPAT-123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\n```\n\n### 🧞‍♂️ Interactive setup process\n\nThis plugin offers an interactive setup process via the `npx create-sourcebit` command. It asks users for their Contentful Personal Access Token and allows them to select their Contentful space and environment.\n\n## 📥 Input\n\n_N/A_\n\n## 📤 Output\n\nThis plugin adds normalized entries and assets to the `objects` data bucket and normalized model objects to the `models` data bucket.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackbit%2Fsourcebit-source-contentful","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackbit%2Fsourcebit-source-contentful","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackbit%2Fsourcebit-source-contentful/lists"}