dothiv / dothiv-contentful-bundle
This package is abandoned and no longer maintained.
No replacement package was suggested.
ContentfulBundle for the Symfony Framework
v0.2.1
2015-08-16 20:38 UTC
Requires
- doctrine/doctrine-bundle: 1.2.*
- doctrine/doctrine-cache-bundle: 1.0.x
- doctrine/orm: >=2.2.3,<2.4-dev
- dothiv/dothiv-valueobject-bundle: 1.x
- gedmo/doctrine-extensions: 2.3.*
- imagine/imagine: 0.6.*
- phpoption/phpoption: 1.4.*
- symfony/framework-bundle: ~2.3
- symfony/twig-bundle: 2.3.*
- symfony/validator: 2.3.*
- twig/extensions: 1.0.*
Requires (Dev)
This package is not auto-updated.
Last update: 2020-05-01 17:49:15 UTC
README
This is a Symfony2 bundle for providing a local queryable cache of Contentful entries and assets.
It's a subtree split off dothiv/dothiv.
Setup
The cache needs a database.
# Create database if not created before
sudo su postgres
psql
CREATE USER contentful;
CREATE DATABASE contentful;
GRANT ALL PRIVILEGES ON DATABASE contentful TO contentful;
ALTER USER contentful WITH PASSWORD 'password';
# Update the schema
app/console doctrine:schema:update --force
Usage
Sync content
Use app/console contentful:sync <access_token> to make your content available locally.
PageController
PageController
contains a controller which can create the
correct cache headers. As it only listens on contentful item dates it is required to define a
minimum modification for the app. Run this command after every deploy to set it:
app/console contentful:config last_modified_content.min_last_modified `date +%FT%T%z`