Coder Social home page Coder Social logo

sanduhrs / contenta_jsonapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from contentacms/contenta_jsonapi

0.0 1.0 0.0 46.06 MB

Contenta CMS, the decoupled Drupal

Home Page: http://www.contentacms.org/

License: GNU General Public License v2.0

PHP 48.77% Shell 13.55% CSS 1.93% HTML 35.75%

contenta_jsonapi's Introduction

Contenta CMS Contenta logo

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.

contenta_jsonapi's People

Contributors

dawehner avatar e0ipso avatar yann-yinn avatar tormi avatar frega avatar wimleers avatar tarekdj avatar justafish avatar mdonadio avatar matthieuscarset avatar eojthebrave avatar michaellenahan avatar alexsenatore avatar heymp avatar shrop avatar joaogarin avatar skyred avatar mogtofu33 avatar jaesin avatar greg-1-anderson avatar gmsteuart avatar davidhwang avatar danielruf avatar judapriest avatar briancwald avatar bbrala avatar shadcn avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.