contentacms / contenta_jsonapi
Installs: 134 002
Dependents: 2
Suggesters: 0
Security: 0
Stars: 327
Watchers: 29
Forks: 105
Open Issues: 0
Type:drupal-profile
Requires
- cweagans/composer-patches: ^1.6.0
- drupal/admin_toolbar: ^1.23
- drupal/adminimal_theme: ^1.4
- drupal/consumer_image_styles: ^3.0@rc
- drupal/consumers: ^1.8
- drupal/contentajs: ^1.0@beta
- drupal/core: ^8.7
- drupal/decoupled_router: ^1.1
- drupal/image_widget_crop: ^2.1
- drupal/inline_entity_form: ^1.0@beta
- drupal/jsonapi_extras: ^3.6
- drupal/jsonrpc: ^1.0@beta
- drupal/material_admin: ^1.0@alpha
- drupal/openapi: ^1.0@beta
- drupal/openapi_ui: ^1.0@rc
- drupal/openapi_ui_redoc: ^1.0@rc
- drupal/schemata: ^1.0@alpha
- drupal/simple_oauth: ^3.3
- drupal/subrequests: ^2.0
- drupal/video_embed_field: ^2.0
Requires (Dev)
- drupal/coder: ^8.2
- drupal/config_inspector: 1.x-dev
- drupal/features: ^3.5
- guzzlehttp/guzzle: ~6.0
- dev-8.x-3.x
- v3.0.680
- v3.0.679
- v3.0.666
- v3.0.665
- v3.0.664
- v3.0.654
- v3.0.653
- v3.0.651
- v3.0.650
- v1.608
- v1.607
- v1.606
- v1.604
- v1.602
- v1.601
- v1.598
- v1.597
- v1.595
- v1.594
- v1.593
- v1.590
- v1.588
- v1.587
- v1.586
- v1.584
- v1.581
- v1.580
- v1.579
- v1.578
- v1.577
- v1.576
- v1.573
- v1.512
- v1.508
- v1.507
- v1.497
- v1.494
- v1.484
- v1.481
- v1.479
- v1.477
- v1.476
- v1.474
- v1.468
- v1.467
- v1.461
- v1.457
- v1.453
- v1.451
- v1.449
- v1.447
- v1.445
- v1.443
- v1.442
- v1.438
- v1.433
- v1.431
- v1.428
- v1.426
- v1.425
- v1.417
- v1.408
- v1.379
- v1.375
- v1.373
- v1.367
- v1.365
- v1.0.0
- dev-e0ipso-patch-1
- dev-feat/update-simple-oauth
- dev-use-core-jsonapi
- dev-GMSteuart-issue-362
- dev-node-view-page
- dev-fix/test-installer
- dev-8.x-2.x
- dev-simplify-open-api
- dev-fix/319--remove-default-content-on-revert
- dev-fix-deploy
- dev-fix-ci
- dev-fix-tests
- dev-new-content-model
- dev-8.x-1.x
- dev-redis-share
This package is auto-updated.
Last update: 2024-05-17 08:27:56 UTC
README
DEPRECATED. Contenta CMS was an educational distribution to show examples of best practices for decoupled projects. Decoupled Drupal has been stable for a long time and the relevance of this project has dwindled over the years. Additionally, since no one has stepped up to fill the maintainer role, I have decided to archive this project. Thanks to everyone who participated to this project over the years.
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.
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 git@github.com: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.