From 3eeaf7a823f0c990e31d139d03037496a22dbc19 Mon Sep 17 00:00:00 2001 From: Alin Voinea Date: Fri, 29 Sep 2023 12:46:32 +0300 Subject: [PATCH] docs: Update README and DEVELOP --- DEVELOP.md | 13 ++++++------- README.md | 57 ++++++++++++++++++++---------------------------------- 2 files changed, 27 insertions(+), 43 deletions(-) diff --git a/DEVELOP.md b/DEVELOP.md index fe725d8..6e6ccfe 100644 --- a/DEVELOP.md +++ b/DEVELOP.md @@ -16,12 +16,14 @@ 1. Go to http://localhost:3000 -1. Happy hacking! +1. Initialize git hooks ```Bash - cd src/addons/volto-banner/ + yarn prepare ``` +1. Happy hacking! + ### Or add @eeacms/volto-banner to your Volto project Before starting make sure your development environment is properly set. See [Volto Developer Documentation](https://docs.voltocms.com/getting-started/install/) @@ -48,18 +50,15 @@ Before starting make sure your development environment is properly set. See [Vol 1. Install - yarn develop + make develop yarn 1. Start backend - docker pull plone - docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone + docker run --pull always -it --rm --name plone -p 8080:8080 -e SITE=Plone plone/plone-backend ...wait for backend to setup and start - `Ready to handle requests`: - docker logs -f plone - ...you can also check http://localhost:8080/Plone 1. Start frontend diff --git a/README.md b/README.md index a6fe5d9..8042341 100644 --- a/README.md +++ b/README.md @@ -33,23 +33,6 @@ It is configurable through `/controlpanel/banner`. ## Getting started -### Start Plone backend with Docker - -1. Get the latest Docker images - - ``` - docker pull plone - docker pull plone/volto - ``` - -1. Start Plone backend - - ``` - docker run -it --rm -p 8080:8080 -e SITE=Plone -e ADDONS="eea.banner" -e PROFILES="profile-eea.banner:default" plone - ``` - -1. Go to http://localhost:3000 - ### Try volto-banner with Docker git clone https://github.com/eea/volto-banner.git @@ -61,42 +44,44 @@ Go to http://localhost:3000 ### Add volto-banner to your Volto project +1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone + ```Bash docker compose up backend ``` 1. Start Volto frontend -- If you already have a volto project, just update `package.json`: +* If you already have a volto project, just update `package.json`: - ```JSON - "addons": [ - "@eeacms/volto-banner" - ], + ```JSON + "addons": [ + "@eeacms/volto-banner" + ], - "dependencies": { - "@eeacms/volto-banner": "^2.0.0" - } - ``` + "dependencies": { + "@eeacms/volto-banner": "*" + } + ``` -- If not, create one: +* If not, create one: - ``` - npm install -g yo @plone/generator-volto - yo @plone/volto my-volto-project --addon @eeacms/volto-banner - cd my-volto-project - ``` + ``` + npm install -g yo @plone/generator-volto + yo @plone/volto my-volto-project --canary --addon @eeacms/volto-banner + cd my-volto-project + ``` -1. Install new add-ons and start Volto: +1. Install new add-ons and restart Volto: ``` yarn yarn start ``` -2. Go to http://localhost:3000 -3. Login `admin:admin` -4. Go to `Site Setup > Banner settings` and configure your banner +1. Go to http://localhost:3000 + +1. Happy editing! ## Release