• Stars
    star
    326
  • Rank 128,622 (Top 3 %)
  • Language
    PHP
  • License
    GNU General Publi...
  • Created over 7 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Contenta CMS, the decoupled Drupal

Contenta CMS Contenta logo

LOOKING FOR HELP TO MAINTAIN CONTENTA. It has been a while since I have found the motivation to keep Contenta CMS up-to-date and improved. I don't anticipate this changing in the near future. Please reach out if you would like to step up as a new maintainer of this project.

Contenta is a content API and CMS based on Drupal 8. It provides a standard, jsonapi-based platform for building decoupled applications and websites.

Install

Follow the documentation instructions to install Contenta CMS.

CURL

Once your site is running locally, you might want to use Curl to examine the pre-installed content:

curl --header 'Accept: application/vnd.api+json' http://127.0.0.1:8888/api/recipes

The result will be a list of recipes. Note that:

  • The Drupal implementation of the jsonapi uses entity uuids to identify individual content resources. Append a /{{uuid}} to the URL above to fetch a single recipe.
  • Contenta uses the JSON API Extras module to customize the URL to resources: /api/recipes instead of /jsonapi/node/recipes, for example. Contenta also configures JSON API Extras to customize the output of the request to eliminate unnecessary fields.

CORS

When you actually build a front-end you will likely have CORS (Cross-Origin Resource Sharing) issues.

In order to allow browsers to request the contenta back-end you need to:

  • Copy sites/default/default.services.yml to sites/default/services.yml
  • Allow your app to access it, by replacing the end of this configuration file.
  cors.config:
    enabled: true
    allowedHeaders:
      - '*'
    allowedMethods:
      - '*'
    allowedOrigins:
       # Note: you need to specify the host + port where your app will run.
      - localhost:8000
    exposedHeaders: false
    maxAge: false
    supportsCredentials: false
  • Run drush: cd <DESTINATION>/web && ../vendor/bin/drush cr

Development

Join the discussion in the #contenta Slack channel.

For documention on the development on contenta_jsonapi itself, see docs/development.

Code of conduct

Development Installation

  • If you want a setup which allows you to contribute back to Contenta, follow the installation instructions above
  • Replace the /web/profiles/contrib/contenta_jsonapi directory with a checkout of this repo
cd -DESTINATION-
rm -rf web/profiles/contrib/contenta_jsonapi
git clone [email protected]:contentacms/contenta_jsonapi.git web/profiles/contrib/contenta_jsonapi

Testing

Nightwatch

Nightwatch provides automated browser testing and can be found in the tests/nightwatch directory. To install and run locally, you will need Yarn and Chrome.

yarn install
yarn run nightwatch

Front-ends

There are a bunch of example consumers, see http://www.contentacms.org/#example-consumers for a list of them.

Update

Contenta CMS is a Fork & Go solution. There is no supported upgrade path. You may update your Drupal like you usually do.

Please see documented issues :

Credits

This work is based upon a couple of contrib modules.

On top of that the thunder distrbution was used as sort of a base for this installation profile.

Contenta CMS is built by humans.

More Repositories

1

contenta_vue_nuxt

Start in minutes a Drupal 8 with JSON API and Vue.js : a Nuxt.js ( Vue.js SSR ) consumer for Contenta CMS
CSS
126
star
2

contentajs

A nodejs server that proxies to Contenta CMS and holds custom code.
JavaScript
102
star
3

contenta_angular

Contenta CMS Angular frontend
TypeScript
56
star
4

contenta_docker

Shell
51
star
5

contenta_react

Demo application written in React
JavaScript
38
star
6

contenta_react_next

React + Next.js implementation for Contenta
JavaScript
14
star
7

contenta_gatsby

Example of gatsby site pulling data from Contenta CMS
CSS
14
star
8

contentajs-graphql

GraphQL.js helpers for Contenta JS
JavaScript
13
star
9

type-graph

PHP
10
star
10

contenta-bot

A really simple chatbot suggesting recipes
JavaScript
10
star
11

contenta_jsonapi__elm

Elm
9
star
12

contenta_aframe

An A-Frame WebVR consumer for Contenta CMS
HTML
9
star
13

contenta_jsonapi_project

See https://github.com/drupal-http-apis/contenta_jsonapi for more information
Shell
9
star
14

contenta_ionic

An example Ionic Framework demo using Contenta CMS as a backend.
HTML
8
star
15

jsonapi-spike

[OUTDATED] Sample JSONAPI implementation
PHP
8
star
16

contenta_ember

Demo app using Ember JS.
HTML
8
star
17

snail

Decoupled routing for Drupal
PHP
6
star
18

contentacms.github.io

Static site for the Contenta CMS project
HTML
5
star
19

contenta_angular_service

Shared services for the example Angular consumers
TypeScript
3
star
20

contenta_jsonapi_demo

PHP
2
star
21

api_version

PHP
2
star
22

contentajsRedis

Redis wrapper for ContentaJS, a drop in replacement for the LRU in-memory cache.
JavaScript
2
star
23

my-awesome-api

[EXPERIMENT] Site generated by the Pantheon crew
PHP
1
star