Last active
February 10, 2023 10:32
-
-
Save rnixx/66ddf34eaf5af3b3a3fb1c8b8d1af79b to your computer and use it in GitHub Desktop.
Revisions
-
rnixx revised this gist
Feb 10, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -128,7 +128,7 @@ Adding custom styles Create ``theme/extras/custom.overrides`` and restart frontend. This file contains custom LESS code. Replace the logo -
rnixx revised this gist
Feb 10, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -81,7 +81,7 @@ Open a dedicated terminal and run the backend server:: make zope-start Connect to your zope instance to ``localhost:8080`` and create a plone Site under path ``Plone``. Start frontend node server in a dedicated terminal:: -
rnixx revised this gist
Feb 10, 2023 . 1 changed file with 12 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,8 +31,8 @@ Use ``yo`` to call the volto generator. It generates the directory structure for While ``yo`` runs, you get asked some questions. Answer them as follows: - Project name (e.g. my-volto-project) frontend - Would you like to add addons? false Install backend server. The backend server provides the actual database and REST endpoints used by Volto. The following steps create a Python virtual environment, generate a Makefile and install and start Zope/Plone:: @@ -59,25 +59,31 @@ Install backend server. The backend server provides the actual database and REST Hit enter until done to accept all defaults. Create ``requirements.txt``. It contains the Python packages to be installed. ``Plone`` is a policy package handling all the requirements needed to run the backend server:: echo "Plone" > requirements.txt Create an ``instance.yaml``. It contains required configuration for running the Zope server. Once ``mxmake`` handles the initial creation of this file properly, this stept is not necessary any more. The minimal information to be conained in ``instance.yaml``:: default_context: initial_user_name: 'admin' initial_user_password: 'admin' db_storage: direct Run make to install the backend server:: make install Open a dedicated terminal and run the backend server:: make zope-start Connect to your zope instance to ``localhost:8080`` and create plone Site path ``Plone``. Start frontend node server in a dedicated terminal:: cd frontend yarn install -
rnixx revised this gist
Feb 10, 2023 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,7 +42,7 @@ Install backend server. The backend server provides the actual database and REST ./venv/bin/pip install https://github.com/mxstack/mxmake/archive/develop.zip ./venv/bin/mxmake init ``mxmake init`` fires an interactive terminal session. Once asked, choose:: [?] Include topics: [X] applications @@ -57,7 +57,7 @@ Choose:: [X] core.packages [ ] core.sources Hit enter until done to accept all defaults. Create ``requirements.txt``:: -
rnixx revised this gist
Feb 10, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,7 +34,7 @@ While ``yo`` runs, you get asked some questions. Answer them as follows: - Project name (e.g. my-volto-project) frontend - Would you like to add addons? false Install backend server. The backend server provides the actual database and REST endpoints used by Volto. The following steps create a Python virtual environment, generate a Makefile and install and start Zope/Plone:: mkdir backend cd backend -
rnixx revised this gist
Feb 10, 2023 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,7 +21,7 @@ Install npm packages required to bootstrap a Volto project. The installation of yo \ @plone/generator-volto Since we installed NPM packages locally, we want to extend the ``PATH`` for convenient access to the installed terminal commands:: export PATH=$PATH:$(pwd)/node_modules/.bin @@ -34,7 +34,7 @@ While ``yo`` runs, you get asked some questions. Answer them as follows: - Project name (e.g. my-volto-project) frontend - Would you like to add addons? false Install backend server. The backend server provides the actual database and REST endpoints used by Volto:: mkdir backend cd backend -
rnixx revised this gist
Feb 10, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ Install Node version manager (nvm). Volto frontend requires a Node.js server for wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash Install and use Node.js in the required version. At the time of writing this document, this is 16.x:: nvm install 16 nvm use 16 -
rnixx revised this gist
Feb 10, 2023 . 1 changed file with 4 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,8 +3,6 @@ How to bootstrap a volto project Install Node package manager (npm). It is the tool required to install JavaScript packages and libraries:: sudo apt install npm Install Node version manager (nvm). Volto frontend requires a Node.js server for resource delivery and server side rendering. Node version manager is a tool which helps running the version of Node.js required by Volto:: @@ -16,23 +14,22 @@ Install and use Node.js in the required version. At the time of writing this doc nvm install 16 nvm use 16 Install npm packages required to bootstrap a Volto project. The installation of the JavaScript packages is done locally, not system wide. This way we avoid potential conflicts if other projects require e.g. a differing set of installed package versions to run.:: npm install --prefix . \ yarn \ yo \ @plone/generator-volto Since we installed NPM packages locally, we want to extend the ``PATH`` for convenient access to the provided commands:: export PATH=$PATH:$(pwd)/node_modules/.bin Use ``yo`` to call the volto generator. It generates the directory structure for our Volto frontend:: yo @plone/volto While ``yo`` runs, you get asked some questions. Answer them as follows: - Project name (e.g. my-volto-project) frontend - Would you like to add addons? false -
rnixx revised this gist
Feb 10, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ How to bootstrap a volto project Install Node package manager (npm). It is the tool required to install JavaScript packages and libraries:: .. code-block:: sh sudo apt install npm -
rnixx revised this gist
Feb 10, 2023 . 1 changed file with 7 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +1,23 @@ How to bootstrap a volto project ================================ Install Node package manager (npm). It is the tool required to install JavaScript packages and libraries:: .. code-block:: shell sudo apt install npm Install Node version manager (nvm). Volto frontend requires a Node.js server for resource delivery and server side rendering. Node version manager is a tool which helps running the version of Node.js required by Volto:: wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash Install and use Node.js in the required version. At the time of writing this document, this is 16.x: nvm install 16 nvm use 16 Install npm packages, either globally or local:: npm install --prefix . \ yarn \ yo \ -
rnixx revised this gist
Feb 9, 2023 . 1 changed file with 62 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -81,3 +81,65 @@ Start frontend node server:: cd frontend yarn install yarn start Start Developing ================ Structure (Points of interest): - frontend - omlette (-> node_modules/@plone/volto) - Handy link to see how things are done. - src (Containing our react/JS development code) - theme (Includes all CSS, LESS, fonts, etc...) - globals (Not exists initially, contains variables) - public (Static serverd folder, contains robots.txt, favicon) Examples of theme customization ------------------------------- Changing variables ~~~~~~~~~~~~~~~~~~ Create ``theme/globals/site.variables`` (it is a LESS file) contaning:: @fontName: 'FreeMono' .. note:: Every time you create a file in the themes folder, the frontend server must be restarted. .. note:: To get an overview which variables are to be overwritten, take a look at ``omelette/theme/themes/default/globals/site.variables``. Adding custom styles ~~~~~~~~~~~~~~~~~~~~ Create ``theme/extras/custom.overrides`` and restart frontend. These file contains custom LESS code. Replace the logo ~~~~~~~~~~~~~~~~ In volto, we are able to override virtually every file within ``src`` with a custom version. This is called component shadowing. Files to shadow are best located via the ``omelette`` convenience location. The logo file we need to override is located at ``src/components/theme/Logo/Logo.svg``. Our component shadowing root is ``src/customizations`` where the target structure gers replicated with the files we want to override. This works for all files types. So, to finally customize the logo, we create ``src/customizations/components/theme/Logo/Logo.svg`` with the custom logo image we want to use. -
rnixx revised this gist
Feb 9, 2023 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,12 +19,12 @@ Install npm packages, either globally or local:: yo \ @plone/generator-volto If installed local, add local node_modules/.bin directory to PATH:: export PATH=$PATH:$(pwd)/node_modules/.bin Use ``yo`` to call the volto generator:: yo @plone/volto -
rnixx renamed this gist
Feb 9, 2023 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
rnixx created this gist
Feb 9, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,83 @@ How to bootstrap a volto project ================================ Install npm:: sudo apt install npm Install nvm:: wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash Install npm packages, either globally or local:: nvm install 16 nvm use 16 npm install --prefix . \ yarn \ yo \ @plone/generator-volto If installes local, add bin local node modile bin directory to PATH:: export PATH=$PATH:$(pwd)/node_modules/.bin Use yo to call the volto generator:: yo @plone/volto Answer questions: - Project name (e.g. my-volto-project) frontend - Would you like to add addons? false Install backend server:: mkdir backend cd backend python3 -m venv venv ./venv/bin/pip install https://github.com/mxstack/mxmake/archive/develop.zip ./venv/bin/mxmake init Choose:: [?] Include topics: [X] applications [X] core [?] Include domains from topic "applications": [X] applications.cookiecutter [X] applications.zope [?] Include domains from topic "core": [X] core.base [X] core.mxenv [X] core.mxfiles [X] core.packages [ ] core.sources Hit enter for all defaults. Create ``requirements.txt``:: echo "Plone" > requirements.txt Create an ``instance.yaml`` containing:: default_context: initial_user_name: 'admin' initial_user_password: 'admin' db_storage: direct Run make:: make zope-start Connect to your zope instance to ``localhost:8080`` and create plone Site path ``Plone``. Start frontend node server:: cd frontend yarn install yarn start