airtonzanon / sculpin-contentful-bundle
Fetch contentful content and dump the markdowns as posts for sculpin
Package info
github.com/airtonzanon/sculpin-contentful-bundle
pkg:composer/airtonzanon/sculpin-contentful-bundle
Fund package maintenance!
0.0.10
2023-05-30 09:16 UTC
Requires
- php: ^8.1
- ext-iconv: *
- contentful/contentful: ^7.0.1
- symfony/console: ^v6.2.10
Requires (Dev)
- infection/infection: ^0.27.0
- malukenho/mcbumpface: ^1.2.0
- phpunit/phpunit: ^10.1.3
- vimeo/psalm: ^5.11.0
Suggests
- sculpin/sculpin: @stable
This package is auto-updated.
Last update: 2026-06-27 23:40:00 UTC
README
Using Contentful as content management system (CMS), it will download the content from contentful and add them on source/_[something] directory.
How to use
Environment variables:
contentful_token=<token> # This is the access token for this space. Normally you get both ID and the token in the Contentful web app
contentful_space_id=<space_id> # This is the space ID. A space is like a project folder in Contentful terms
Installation:
composer require airtonzanon/sculpin-contentful-bundle dev-master
Usage
On app/SculpinKernel.php you should add:
// ... protected function getAdditionalSculpinBundles(): array { return [ SculpinContentfulBundle::class, ]; } // ...
# Environment variables $ export contentful_token=<token> $ export contentful_space_id=<space_id> # Sculpin command $ vendor/bin/sculpin contentful:fetch Created file: source/_til/2021-04-05-first-post.md Created file: source/_til/2020-12-05-second-post.md Created file: source/_til/2020-11-23-third-post.md
On Contentful:
- The name of the content type is the name that we create the folder inside source;
- The fields
language, title, date and contentMarkdownmust exist;
We are still going to add the settings to the user to use their specific fields on this bundle