Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme 2022 #3131

Merged
merged 6 commits into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

### Internal

- Better Readme, updated to 2022 @sneridagh
- Add `id` as widget type as well @sneridagh

## 15.0.0-alpha.13 (2022-03-09)
Expand Down
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ MAKEFLAGS+=--no-builtin-rules
# Project settings

INSTANCE_PORT=8080
DOCKER_IMAGE=plone/plone-backend:5.2.6
KGS=plone.restapi==8.21.0 plone.volto==4.0.0a3 plone.rest==2.0.0a2 plone.app.iterate==4.0.2 plone.app.vocabularies==4.3.0
DOCKER_IMAGE=plone/plone-backend:5.2.7
KGS=plone.restapi==8.21.2 plone.volto==4.0.0a3 plone.rest==2.0.0a3 plone.app.iterate==4.0.2 plone.app.vocabularies==4.3.0

# Sphinx variables
# You can set these variables from the command line.
Expand Down Expand Up @@ -173,7 +173,11 @@ start-backend: ## Start Plone Backend

.PHONY: start-backend-docker
start-backend-docker:
docker run -it --rm -p 8080:8080 -e SITE=Plone -e ADDONS='$(KGS)' $(DOCKER_IMAGE)
docker run -it --rm --name=backend -p 8080:8080 -e SITE=Plone -e ADDONS='$(KGS)' $(DOCKER_IMAGE)

.PHONY: start-frontend-docker
start-frontend-docker:
docker run -it --rm --name=volto --link backend -p 3000:3000 -e RAZZLE_INTERNAL_API_PATH=http://backend:8080/Plone -e RAZZLE_DEV_PROXY_API_PATH=http://backend:8080/Plone plone/plone-frontend:latest

.PHONY: start-backend-docker-guillotina
start-backend-docker-guillotina:
Expand Down
172 changes: 90 additions & 82 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,32 @@
# Volto

<img align="right" width="300" alt="Volto png" src="./logos/volto-colorful.png" />
<img align="right" width="300" alt="Volto logo png" src="./logos/VoltoLogoEra2.png#gh-light-mode-only" />
<img align="right" width="300" alt="Volto logo png" src="./logos/VoltoLogoEra2-dark-mode.png#gh-dark-mode-only" />

[![NPM](https://img.shields.io/npm/v/@plone/volto.svg)](https://www.npmjs.com/package/@plone/volto)
[![Build Status Core](https://github.com/plone/volto/actions/workflows/core.yml/badge.svg)](https://github.com/plone/volto/actions)
[![Build Status Docs](https://github.com/plone/volto/actions/workflows/docs.yml/badge.svg)](https://github.com/plone/volto/actions)

## Introduction

[Volto](https://github.com/plone/volto) is a React-based frontend for content
management systems, currently supporting three backend implementations: Plone,
Guillotina and a NodeJS reference implementation.
[Volto](https://github.com/plone/volto) is a ReactJS-based frontend for the [Plone](https://plone.org) Content Management System. It will become the default UI for the upcoming Plone 6 release.

[Plone](https://plone.org) is a CMS built on Python with over 20 years of history and experience.
[Plone](https://plone.org) is a CMS built on Python with over more than 20 years of history and experience.
sneridagh marked this conversation as resolved.
Show resolved Hide resolved

Plone has very interesting features that appeal to developers and users alike,
such as customizable content types, hierarchical URL object traversing and a
sophisticated content workflow powered by a granular permissions model. This
allows you to build anything from simple websites to enterprise-grade
intranets.

Volto exposes all these features and communicates with Plone via its
mature [REST API](https://github.com/plone/plone.restapi). Volto has the
ability of being highly themable and customizable.
Volto exposes all these features and communicates with Plone via its [REST API](https://github.com/plone/plone.restapi). Volto has the ability of being easy extensible, themable and customizable.
sneridagh marked this conversation as resolved.
Show resolved Hide resolved

Volto also supports other APIs like [Guillotina](https://guillotina.io/), a
Python resource management system, inspired by Plone and using the same basic
concepts like traversal, content types and permissions model.
It features the Pastanaga Editor, a modern block based content layout editor. It is extensible and customizable, so you can adapt the default blocks provided to match your requirements, or build new ones to cover them.
sneridagh marked this conversation as resolved.
Show resolved Hide resolved

Last but not least, it also supports a [Volto Nodejs-based backend reference](https://github.com/plone/volto-reference-backend) API implementation that
demos how other systems could also use Volto to display and create content
through it.
Volto is extensible using add-ons, you can build your own or choose from the community released ones:
sneridagh marked this conversation as resolved.
Show resolved Hide resolved

- [Volto Add-ons in NPM](https://www.npmjs.com/search?q=keywords%3Avolto-addon%2Cvolto)
- [Volto Awesome](https://github.com/collective/awesome-volto)

## Demo

Expand All @@ -56,7 +52,7 @@ First get all the requirements installed on your system.

- [Node.js LTS (16.x)](https://nodejs.org/)
- [Python 3.8.x](https://python.org/) or
- [Docker](https://www.docker.com/get-started) (if using the Plone/Guillotina docker images)
- [Docker](https://www.docker.com/get-started) (if using the Plone docker images)

### Create a Volto project using the generator

Expand All @@ -74,8 +70,6 @@ follow the prompts questions, provide `myvoltoproject` as project name then, whe

### Bootstrap the Plone API backend

We recommend Plone as backend of choice for Volto.

You can bootstrap a ready Docker Plone container with all the dependencies and ready for Volto use. We recommend to use the Plone docker builds based in `pip` [plone/plone-backend](https://github.com/plone/plone-backend) image:

```shell
Expand All @@ -98,13 +92,13 @@ For the Plone 5 series latest released version (with Python 3) and above is reco

The following KGS (or above) are also recommended, for any Plone version used.

#### KGS (known good versions) for backend packages
#### KGS (known good set of versions) for backend packages

Volto always works best with latest versions of the "Frontend stack" or at least the recommended ones (in parenthesis) which are:

- plone.restapi (8.18.0)
- plone.rest (2.0.0a1)
- plone.volto (3.1.0a7)
- plone.restapi (8.21.2)
- plone.rest (2.0.0a3)
- plone.volto (4.0.0a3)

and the following core packages since some features require up to date versions:

Expand Down Expand Up @@ -167,7 +161,7 @@ Please create a new [issue](https://github.com/plone/volto/issues/new) or [pull

## Documentation

You can find the documentation in [https://docs.voltocms.com](https://docs.voltocms.com)
You can find the latest (in-progress) documentation in [https://6.dev-docs.plone.org/](https://6.dev-docs.plone.org/volto/index.html)

## Training

Expand Down Expand Up @@ -222,14 +216,14 @@ JavaScript-centered trainings.

## Browser support

Volto works well with any modern (and updated) browser, including their mobile
Volto works well with any modern (evergreen) browser, including their mobile
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "evergreen" mean? I've never heard that term used for a web browser, but only for trees and shrubbery.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems it's a trendy word now... I've already seen it in a number of places refers to those browsers that are automatically updated... so all modern browsers.

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"modern browser" would do IMHO.

flavors: Chrome, Firefox, Safari, Edge.

We do not guarantee that browsers who were deprecated by their vendors (e.g. Internet Explorer 11) will be supported by Volto in the future.
We do not guarantee that browsers who were deprecated by their vendors (e.g. Internet Explorer 11) are supported by Volto. Although proven possible, it's known to be a huge effort and up to the integrator to provide support for it.
sneridagh marked this conversation as resolved.
Show resolved Hide resolved

## Upgrades

You can find the upgrade guide here: https://docs.voltocms.com/upgrade-guide/
You can find the upgrade guide here: https://6.dev-docs.plone.org/volto/upgrade-guide/index.html

## Volto Development

Expand All @@ -248,14 +242,12 @@ git clone https://github.com/plone/volto.git
yarn
```

### Install a backend
### Install Plone backend

#### Plone (recommended)

Either using a Docker image
Either using a Docker command:

```shell
docker run -it --rm --name=plone -p 8080:8080 -e SITE=Plone -e ADDONS="plone.volto" -e ZCML="plone.volto.cors" -e PROFILES="plone.volto:default-homepage" plone
docker run -it --rm --name=backend -p 8080:8080 -e SITE=Plone -e ADDONS="plone.restapi==8.21.2 plone.app.iterate==4.0.2 plone.rest==2.0.0a3 plone.app.vocabularies==4.3.0 plone.volto==4.0.0a3" -e PROFILES="plone.volto:default-homepage" plone/plone-backend
```

or using the convenience makefile command:
Expand All @@ -272,36 +264,24 @@ Installation Documentation](https://docs.plone.org/manage/installing/installatio
make build-backend
```

#### Guillotina (experimental)
### Run frontend

It still doesn't support the full API/features that Plone provides.
Either using a Docker command:

```shell
docker-compose -f g-api/docker-compose.yml up -d
docker run -it --rm --name=volto --link backend -p 3000:3000 -e RAZZLE_INTERNAL_API_PATH=http://backend:8080/Plone -e RAZZLE_DEV_PROXY_API_PATH=http://backend:8080/Plone plone/plone-frontend:latest
```

or using the convenience makefile command:

```shell
make start-backend-docker-guillotina
```

### Run frontend

Either using Docker

```shell
docker run -it --rm --name=volto --link plone -p 3000:3000 plone/volto

# or with Volto add-ons enabled:

docker run -it --rm --name=volto --link plone -e ADDONS="volto-testaddon volto-slate:asDefault" -p 3000:3000 plone/volto
make start-frontend-docker
```

or using the convenience yarn command:
or from the local repository code:

```shell
yarn start
yarn && yarn start
```

### Browsing
Expand Down Expand Up @@ -339,59 +319,55 @@ a dry-release command for testing the output is also available:
yarn dry-release
```

### Acceptance testing

Volto uses [Cypress](https://www.cypress.io/) for browser-based acceptance testing.

Run acceptance tests (with the Plone backend):
and alpha release can also be cut using:

```shell
yarn ci:cypress:run
yarn release-alpha
```

Run acceptance tests (with the Guillotina backend):
### Acceptance testing

```shell
yarn ci:cypress:run:guillotina
```
Volto uses [Cypress](https://www.cypress.io/) for browser-based acceptance testing.

#### Writing new acceptance tests
There are a number of fixtures available covering all the configuration use cases. These fixtures have both a specific backend and frontend configuration setup and a related set of tests. The CI infrastructure runs them all automatically on every push to a branch or PR.

When writing new acceptance tests you usually want to minimize the time it takes to run the tests.
The tests can be run in headless mode (as the CI do), or within the Cypress user interface. The later is the one that you run under development.
sneridagh marked this conversation as resolved.
Show resolved Hide resolved

To do so, start three individual terminal sessions for running the Plone backend, the Volto frontend and the acceptance tests.
### How to run acceptance tests locally (during development)

Start the Plone backend:
When writing new acceptance tests you usually want to minimize the time it takes to run the tests, and still be able to debug or inspect what's going on.
sneridagh marked this conversation as resolved.
Show resolved Hide resolved

```shell
make start-test-backend
```
To do so, start three individual terminal sessions for running the Plone backend, the Volto frontend and the acceptance tests.
sneridagh marked this conversation as resolved.
Show resolved Hide resolved

Start the Volto frontend:
1. Run the backend fixture
sneridagh marked this conversation as resolved.
Show resolved Hide resolved
```shell
make test-acceptance-server
```
2. Run the frontend fixture
sneridagh marked this conversation as resolved.
Show resolved Hide resolved
```shell
yarn cypress:start-frontend
```
3. Run the Cypress tests for that fixture
sneridagh marked this conversation as resolved.
Show resolved Hide resolved
```shell
yarn cypress:open
```

```shell
make start-test-frontend
```
Available fixtures:

Open Cypress and start acceptance tests:
- Core (core or not special naming in the test commands)
- Multilingual (multilingual)
- Working Copy (workingCopy)
- Core Sandbox (coresandbox)

```shell
make start-test
```
There are convenience commands for each of these fixtures. See `package.json` or `.github` CI setup for more information.

Go to the `cypress/integration` folder to see existing tests.
#### Writing new acceptance tests

Go to the `cypress/tests` folder to see existing tests. There is a directory per fixture.
This directory is hot reloaded with your changes as you write the tests. For more information on how to write Cypress tests:

https://docs.cypress.io

#### Running the acceptance tests with Guillotina backend

If you want to use Guillotina as backend to run the tests you should run:

```shell
yarn ci:start-api-plone-guillotina
```

## Translations

If you would like contribute to translate Volto into several languages, please, read the [Internationalization (i18n) guide](https://docs.voltocms.com/customizing/i18n/).
Expand All @@ -402,6 +378,38 @@ If you would like contribute to translate Volto into several languages, please,
<img src="https://contrib.rocks/image?repo=plone/volto" />
</a>

## Alternative backends

Volto also supports other APIs like [Guillotina](https://guillotina.io/), a
Python resource management system, inspired by Plone and using the same basic
concepts like traversal, content types and permissions model.
sneridagh marked this conversation as resolved.
Show resolved Hide resolved

Last but not least, it also supports a [Volto Nodejs-based backend reference](https://github.com/plone/volto-reference-backend) API implementation that
sneridagh marked this conversation as resolved.
Show resolved Hide resolved
demos how other systems could also use Volto to display and create content
through it.

### Run a Guillotina backend

*Disclaimer:* Guillotina doesn't support the full API/features that Plone provides. Contributors are welcome.

```shell
docker-compose -f g-api/docker-compose.yml up -d
```

or using the convenience makefile command:

```shell
make start-backend-docker-guillotina
```

### Running the acceptance tests with Guillotina backend

If you want to use Guillotina as backend to run the tests you should run:
sneridagh marked this conversation as resolved.
Show resolved Hide resolved

```shell
yarn ci:start-api-plone-guillotina
```

## License

MIT License. Copyrights hold the [Plone Foundation](https://plone.org/foundation).
Expand Down
3 changes: 0 additions & 3 deletions api/versions.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,3 @@ sortedcontainers = 2.4.0

# Added by buildout at 2022-02-14 13:57:43.277710
plone.volto = 4.0.0a3

# Added by buildout at 2022-02-14 13:57:43.277710
plone.volto = 4.0.0a3
Binary file added logos/VoltoLogoEra2-dark-mode.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added logos/VoltoLogoEra2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
"cypress:run:multilingual": "NODE_ENV=production CYPRESS_API=plone cypress run --config integrationFolder='cypress/tests/multilingual'",
"cypress:run:workingCopy": "NODE_ENV=production CYPRESS_API=plone cypress run --config integrationFolder='cypress/tests/workingCopy'",
"cypress:run:guillotina": "NODE_ENV=production CYPRESS_API=guillotina cypress run --config integrationFolder='cypress/tests/guillotina'",
"cypress:start-frontend": "RAZZLE_API_PATH=http://localhost:55001/plone yarn start",
"cypress:start-frontend-coresandbox": "ADDONS=coresandbox RAZZLE_API_PATH=http://localhost:55001/plone yarn start",
"cypress:start-frontend-multilingual": "ADDONS=coresandbox:multilingualFixture RAZZLE_API_PATH=http://localhost:55001/plone yarn start",
"cypress:start-frontend-workingCopy": "ADDONS=coresandbox:workingCopyFixture RAZZLE_API_PATH=http://localhost:55001/plone yarn start",
"cy:install": "cypress install",
"cy:test:fixture:setup": "node cypress/support/reset-fixture.js",
"cy:test:fixture:teardown": "node cypress/support/reset-fixture.js teardown",
Expand Down