airtonzanon / sculpin-contentful-bundle
Fetch contentful content and dump the markdowns as posts for sculpin
Fund package maintenance!
www.buymeacoffee.com/airtonzanon
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
- dev-master
- 0.0.10
- 0.0.9
- 0.0.8
- 0.0.7
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- dev-dependabot/composer/symfony/console-6.4.4
- dev-dependabot/composer/phpunit/phpunit-10.5.11
- dev-dependabot/composer/contentful/contentful-7.0.2
- dev-dependabot/composer/vimeo/psalm-5.22.2
- dev-dependabot/composer/infection/infection-0.27.10
- dev-airton/integration
- dev-update
- dev-php8.1
This package is auto-updated.
Last update: 2024-10-27 19:45:47 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 contentMarkdown
must exist;
We are still going to add the settings to the user to use their specific fields on this bundle