2017 © Pedro Peláez
 

library dothiv-contentful-bundle

ContentfulBundle for the Symfony Framework

image

dothiv/dothiv-contentful-bundle

ContentfulBundle for the Symfony Framework

  • Sunday, August 16, 2015
  • by coderbyheart
  • Repository
  • 2 Watchers
  • 0 Stars
  • 192 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

DothivContentfulBundle

Travis CI, (*1)

Code Climate, (*2)

SensioLabsInsight, (*3)

This is a Symfony2 bundle for providing a local queryable cache of Contentful entries and assets., (*4)

It's a subtree split off dothiv/dothiv., (*5)

Setup

The cache needs a database., (*6)

# 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 to make your content available locally., (*7)

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:, (*8)

app/console contentful:config last_modified_content.min_last_modified `date +%FT%T%z`

The Versions