### Start Plone Backend Server Source: https://github.com/plone/training/blob/main/docs/volto-customization/installation.md Command to start the Plone backend server in a dedicated shell session. ```shell make backend-start ``` -------------------------------- ### Start Plone Frontend Server Source: https://github.com/plone/training/blob/main/docs/volto-customization/installation.md Command to start the Plone frontend server (Volto) in a separate shell session. ```shell make frontend-start ``` -------------------------------- ### Start Plone Backend Source: https://github.com/plone/training/blob/main/docs/mastering-plone/installation.md Starts the Plone backend instance, making it accessible via a web browser. ```shell make start ``` -------------------------------- ### Install and Start Volto Project Source: https://github.com/plone/training/blob/main/docs/mastering-plone/voting-story/index.md Installs project dependencies using pnpm and starts the Volto development server. ```shell make install make start ``` -------------------------------- ### Instance Configuration Example Source: https://github.com/plone/training/blob/main/docs/mastering-plone/installation.md Illustrates a typical configuration file for a Zope/Plone instance, showing where add-ons are specified. ```yaml instance.yaml ``` -------------------------------- ### Frontend Server Startup Confirmation Source: https://github.com/plone/training/blob/main/docs/plone-deployment/project-start.md Example console output confirming the frontend server (Volto) has started successfully. ```console 🎭 Volto started at 0.0.0.0:3000 🚀 ``` -------------------------------- ### Bootstrap New Plone Project with Cookieplone Source: https://github.com/plone/training/blob/main/docs/volto-customization/installation.md Command to bootstrap a new Plone project using Cookieplone, allowing specification of Volto add-ons. It guides the user through project setup prompts. ```shell pipx run cookieplone project ``` ```shell [11/17] Volto Addon Name (volto-project-title): volto-teaser-tutorial ``` -------------------------------- ### Install Plone Project Dependencies Source: https://github.com/plone/training/blob/main/docs/volto-customization/installation.md Command to install both the Plone backend and frontend dependencies for the project. ```shell make install ``` -------------------------------- ### Install and Upgrade Pip and Pipx/UV Source: https://github.com/plone/training/blob/main/docs/plone-deployment/setup.md Installs or upgrades pip, pipx, and uv, which are essential tools for managing Python packages and applications. Pipx is used for installing and running Python applications in isolated environments, and uv is a fast Python package installer and resolver. ```shell python -m pip install --upgrade pip python -m pip install --upgrade pipx uv ``` -------------------------------- ### Backend Server Startup Confirmation Source: https://github.com/plone/training/blob/main/docs/plone-deployment/project-start.md Example console output confirming the backend server has started successfully and is listening on a specific port. ```console ... INFO [waitress:486][MainThread] Serving on http://127.0.0.1:8080 ``` -------------------------------- ### Portal Setup and Product Installation Source: https://github.com/plone/training/blob/main/docs/mastering-plone/api.md Details methods for managing Plone's setup and checking product installation status. ```APIDOC portal_setup: runAllExportSteps(): Generates a tarball of artifacts from all export steps. Products.CMFPlone.utils: is_product_installed(product_name): Checks if a specified product is installed in Plone. ``` -------------------------------- ### Start Volto Development Server Source: https://github.com/plone/training/blob/main/docs/mastering-plone/installation.md Starts the Volto development server using the project's Makefile or directly with pnpm. This command is used to run the frontend application during development. ```shell make start ``` ```shell pnpm start ``` -------------------------------- ### Plone Backend Running Output Source: https://github.com/plone/training/blob/main/docs/mastering-plone/installation.md Example output indicating that the Plone backend server is running and ready to handle requests. ```shell katjasuss@purpur training % make start 2022-09-27 08:57:23,961 INFO [Zope:42][MainThread] Ready to handle requests Starting server in PID 28745. 2022-09-27 08:57:23,963 INFO [waitress:486][MainThread] Serving on http://[::1]:8080 2022-09-27 08:57:23,963 INFO [waitress:486][MainThread] Serving on http://127.0.0.1:8080 ``` -------------------------------- ### Plone Add-ons Control Panel Usage Source: https://github.com/plone/training/blob/main/docs/content-editing/site-setup-and-configuration.md This section details the steps to access and manage add-ons through the Plone control panel. It includes instructions on logging in, navigating to Site Setup, and interacting with the Add-Ons interface to install, uninstall, and view add-on details. ```Python def navigate_to_addons_control_panel(): # Assumes user is logged in and has appropriate roles # Click personal menu # Click 'Site Setup' # Click 'Add-Ons' icon pass def manage_add_ons(): # View installed and available add-ons # Click down arrow to show details # Click 'Install' button to install an add-on # Click 'Uninstall' button to uninstall an add-on (with caution) # Click left arrow to exit control panel pass ``` -------------------------------- ### Verify Docker Installation and Status Source: https://github.com/plone/training/blob/main/docs/plone-deployment/setup.md Checks the installed Docker version and confirms if the Docker daemon is running. This is crucial for containerized Plone deployments. ```shell docker --version docker ps ``` -------------------------------- ### Plone Project Creation with Cookieplone Source: https://github.com/plone/training/blob/main/docs/customizing-volto-light-theme/creating-new-project.md Instructions for creating a new Plone project using Cookieplone, a tool that simplifies the setup process. It links to detailed installation guides. ```python # Recommend using Cookieplone for project creation # Refer to the official documentation for detailed steps: # https://6.docs.plone.org/install/create-project-cookieplone.html ``` -------------------------------- ### Cypress Acceptance Test Setup and Execution Commands Source: https://github.com/plone/training/blob/main/docs/mastering-plone/volto_testing.md This section provides shell commands for setting up and running Cypress acceptance tests. It details the steps to start the backend server, the frontend development server, and then execute the Cypress tests. It also guides through the Cypress runner interface for selecting test modes, browsers, and specific test files. ```shell make backend-install make acceptance-backend-start ``` ```shell make acceptance-frontend-dev-start ``` ```shell make acceptance-test ``` -------------------------------- ### Clone and Install Volto Training Project Source: https://github.com/plone/training/blob/main/docs/mastering-plone/installation.md Clones the volto-ploneconf repository from GitHub, navigates into the frontend directory, and installs project dependencies using the provided Makefile. ```shell cd training git clone https://github.com/collective/volto-ploneconf.git frontend cd frontend make install ``` -------------------------------- ### reST Index Configuration Example Source: https://github.com/plone/training/wiki/Writing-Style Example of metadata to include in the index.rst file for a Plone training module. This helps categorize the training content. ```rst :About: Deploying Plone with Ansible and OpsWorks :Level: All levels ``` -------------------------------- ### Navigate to Project Directory Source: https://github.com/plone/training/blob/main/docs/volto-customization/installation.md Command to change the current working directory to the newly created Plone project folder. ```shell cd project-title ``` -------------------------------- ### Accessing Plone Site Setup Control Panels Source: https://github.com/plone/training/blob/main/docs/content-editing/site-setup-and-configuration.md This snippet demonstrates the steps to access the Site Setup control panels in Plone. It involves logging in, clicking the personal menu, and then selecting 'Site Setup'. The control panels are then presented, grouped by categories like General, Content, Users, Security, Version Overview, and Add-ons. Navigation back is also shown. ```python def access_site_setup(): # 1. Navigate to the Plone site and log in. # login_to_plone('https://demo.plone.org/') # 2. Click on the personal menu button. # click_personal_menu() # 3. Click on 'Site Setup'. # click_site_setup() # Control panels are now visible, grouped by categories: # - General # - Content # - Users # - Security # - Version Overview # - Add-ons # 10. To exit Site Setup, click the left arrow button. # click_left_arrow_button() ``` -------------------------------- ### pnpm Workspaces Configuration Source: https://github.com/plone/training/blob/main/docs/volto-customization/installation.md YAML configuration file defining the packages included in the pnpm workspace, typically including core packages and add-ons. ```yaml packages: # all packages in direct subdirs of packages/ - "core/packages/*" - "packages/*" ``` -------------------------------- ### Alternative Lexers Source: https://github.com/plone/training/blob/main/docs/contributing/authors.md Provides examples of alternative lexers that can be used when specific syntax highlighting is needed, such as 'jsx', 'html', 'scss', 'http', and 'less'. ```text jsx ``` ```text html ``` ```text scss ``` ```text http ``` ```text less ``` -------------------------------- ### Console Output Example Source: https://github.com/plone/training/blob/main/docs/contributing/authors.md Use the 'console' lexer for displaying the output of a shell session. This lexer is suitable for mixed command and output blocks. ```console /Plone/training/voltohandson/introtoblocks.md:55: WARNING: Could not lex literal_block as "jsx". Highlighting skipped. ``` -------------------------------- ### Volto Add-on Default Configuration Loader Source: https://github.com/plone/training/blob/main/docs/volto-customization/installation.md Default JavaScript export for a Volto add-on's main entry point, which receives and returns the Volto configuration object. ```javascript export default (config) => { return config; }; ``` -------------------------------- ### Start Frontend Server Source: https://github.com/plone/training/blob/main/docs/plone-deployment/project-start.md Initiates the Plone project's frontend server (Volto). This command is run from the project's root directory and starts the server on port 3000. Initial compilation may take time. ```shell make frontend-start ``` -------------------------------- ### Start Backend Server Source: https://github.com/plone/training/blob/main/docs/plone-deployment/project-start.md Initiates the Plone project's backend server. This command is run from the project's root directory and typically starts the server on http://127.0.0.1:8080. ```shell make backend-start ``` -------------------------------- ### Add Dependency to Volto Add-on Source: https://github.com/plone/training/blob/main/docs/volto-customization/installation.md Command to add a new dependency (e.g., papaparse) to a specific Volto add-on (e.g., volto-teaser-tutorial) using pnpm's filtering. ```shell pnpm --filter volto-teaser-tutorial add papaparse ``` -------------------------------- ### Docker Desktop Settings Source: https://github.com/plone/training/blob/main/docs/plone-deployment/setup.md Provides guidance on accessing and modifying Docker Desktop settings, specifically for adjusting the virtual disk limit and memory allocation. These settings can help resolve issues related to insufficient Docker virtual disk space or memory. ```APIDOC Docker Desktop Settings: Access: Preferences > Resources > Advanced Configuration Options: - Virtual disk limit: Adjust the maximum size of the virtual disk used by Docker. - Memory: Allocate sufficient memory to Docker for building and running images. Purpose: To resolve issues related to insufficient Docker virtual disk space or memory during image building or operation. ``` -------------------------------- ### Install Volto Add-on from GitHub Source: https://github.com/plone/training/blob/main/docs/mastering-plone/volto_addon.md Shows how to install a Volto add-on that is available on GitHub but not yet released on npm. ```json "dependencies": { "@plone/volto": "workspace:*", "@plone/registry": "workspace:*", "volto-ploneconf": "workspace:*", "@foo/volto-bar-block": "github:foo/volto-bar-block#x.y.z" }, ``` ```javascript const addons = ['@foo/volto-bar-block', 'volto-ploneconf']; const theme = ''; module.exports = { addons, theme, }; ``` -------------------------------- ### Clone and Build Plone Training Documentation Source: https://github.com/plone/training/blob/main/docs/contributing/setup-build.md Clones the Plone Training repository, sets up a Python virtual environment, installs dependencies, builds the HTML documentation, and opens it in a web browser. ```shell git clone https://github.com/plone/training.git cd training make html ``` -------------------------------- ### View All Available Documentation Builds Source: https://github.com/plone/training/blob/main/docs/contributing/setup-build.md Displays a list of all available documentation build commands using the Makefile. ```shell make help ``` -------------------------------- ### Install Node.js LTS Version using NVM Source: https://github.com/plone/training/blob/main/docs/plone-deployment/setup.md Installs the latest Long Term Support (LTS) version of Node.js using the Node Version Manager (NVM). It also specifically installs Node.js version 22, which is officially supported by Volto. ```shell nvm install "lts/*" nvm install "22" ``` -------------------------------- ### Volto and React Training Resources Source: https://github.com/plone/training/blob/main/docs/volto-customization/intro.md Provides a link to a YouTube playlist for Volto and React training resources, recommended for beginners or those needing a refresher. These resources supplement the main training content. ```html explore some existing Volto and React training resources ``` -------------------------------- ### TypeScript tsconfig.json Configuration Source: https://github.com/plone/training/blob/main/docs/volto-customization/installation.md Example of a tsconfig.json file used for custom TypeScript configuration in Plone add-ons. It includes path mappings for module resolution, allowing imports from different packages using aliases. ```json { "compilerOptions": { "paths": { "@plone/volto/*": ["../../core/packages/volto/src/*"], "volto-teaser-tutorial/*": ["./src/*"] } } } ``` -------------------------------- ### Clone Training Buildout Backend Source: https://github.com/plone/training/blob/main/docs/mastering-plone/installation.md Clones the training_buildout repository to set up the Plone backend with necessary add-ons for the training. ```shell mkdir training cd training git clone https://github.com/collective/training_buildout.git backend cd backend ``` -------------------------------- ### Link Formatting Example Source: https://github.com/plone/training/blob/main/docs/contributing/authors.md Example of how to format a link to exclude it from link checking by wrapping it in single backticks. ```md Visit the URL `http://www.example.com` for an example. ``` -------------------------------- ### Start Zope Instance Source: https://github.com/plone/training/blob/main/docs/mastering-plone/features.md Starts the Zope instance for Plone. Assumes a standard installation listening on port 8080. ```shell make start ``` -------------------------------- ### Sphinx Build Syntax Source: https://github.com/plone/training/blob/main/docs/contributing/setup-build.md This illustrates the general syntax for setting Sphinx build options using the SPHINXOPTS environment variable with the 'make' command. ```shell make SPHINXOPTS="OPTION VALUE" BUILDER ``` -------------------------------- ### View Makefile Help Source: https://github.com/plone/training/blob/main/docs/plone-deployment/project-new.md Displays all available commands and their descriptions defined in the project's Makefile. ```makefile make help ``` -------------------------------- ### Plone API: Getting Relations (Python) Source: https://github.com/plone/training/blob/main/docs/mastering-plone/relations.md This snippet demonstrates how to retrieve relations using `plone.api.relation.get`. It shows examples of getting relations by source object, by relationship type, and by target object. ```python from plone import api api.relation.get(source=portal.schedule["workflows-made-easy"]) api.relation.get(relationship="speaker") api.relation.get(target=portal.speakers["urs-herbst"]) ``` -------------------------------- ### Plone Training Configuration Example Source: https://github.com/plone/training/blob/main/docs/teaching/before.md An example configuration snippet for Plone, likely used within a Python-based framework to define metadata for a training module. ```python myst: html_meta: "description": "Before the training: Create material, invite trainees, preparation" "property=og:description": "Before the training: Create material, invite trainees, preparation" "property=og:title": "Before the training: Create material, invite trainees, preparation" "keywords": "Plone, Training, material, invite, trainees, preparation" ``` -------------------------------- ### Build Plone Backend Source: https://github.com/plone/training/blob/main/docs/mastering-plone/installation.md Builds the Plone backend by executing tasks such as creating a virtual environment, installing prerequisites, and generating Zope configuration files. ```shell make build ``` -------------------------------- ### Sphinx Build with Suppressed Warnings Source: https://github.com/plone/training/blob/main/docs/contributing/setup-build.md This example demonstrates how to use the SPHINXOPTS environment variable to pass options to Sphinx. Specifically, it cleans the build, then creates a live HTML preview while suppressing warnings related to syntax highlighting failures. ```shell make SPHINXOPTS="-D suppress_warnings=['misc.highlighting_failure']" clean livehtml ``` -------------------------------- ### Software Requirements for Volto Training Source: https://github.com/plone/training/blob/main/docs/volto-customization/intro.md Lists the recommended software installations for a smooth Volto training experience. This includes Node.js, pnpm, nvm, and Docker. ```bash # Node.js version manager https://github.com/nvm-sh/nvm # Node.js https://nodejs.org/en/ >= 20 # pnpm https://pnpm.io/installation # Docker https://www.docker.com/get-started/ ``` -------------------------------- ### Build Presentation Documentation Source: https://github.com/plone/training/blob/main/docs/contributing/setup-build.md Generates an abbreviated version of the documentation optimized for projectors with limited screen space. The output is located at /_build/presentation/index.html. ```shell make presentation ``` -------------------------------- ### Shell Command Example Source: https://github.com/plone/training/blob/main/docs/contributing/authors.md Use the 'shell' lexer for commands to be executed in a terminal. Do not include shell prompts to facilitate easy copying and pasting. ```shell make html ``` ```shell make livehtml ``` -------------------------------- ### Plone Stack Deployment Configurations Source: https://github.com/plone/training/blob/main/docs/plone-deployment/plone-stack.md Illustrates different deployment architectures for Plone, ranging from basic setups without specialized databases to more complex configurations involving web accelerators and multi-server environments. ```Text Web server → Plone Frontend → Plone Backend (file storage) Ideal for demo sites and Plone trials. Web server → Plone Frontend → Plone Backend → Database Solution to be presented in this training. Web server → Web Accelerator → Plone Frontend → Plone Backend → Database In a multi-server environment, load distribution and redundancy are achieved through various configurations, enabling horizontal scaling. Flow of a request to https://example.com Externally accessible machine hosting both the web server and web accelerator on ports 80 and 443. Hosts scalable Plone Frontend and Backend processes, enhancing performance and responsiveness. Can host a ZEO server or a relational database. Managed relational database services with backup and replication are recommended for those unfamiliar with database management, with PostgreSQL being a preferred choice. ``` -------------------------------- ### Initiate Server Setup with Ansible Source: https://github.com/plone/training/blob/main/docs/plone-deployment/server-setup.md Executes the Ansible playbook 'playbooks/setup.yml' to install packages, set up users, SSH, and Docker Swarm on the remote server. ```shell make server-setup ``` -------------------------------- ### Build HTML Documentation Source: https://github.com/plone/training/blob/main/docs/contributing/setup-build.md Builds the long narrative version of the documentation, suitable for online use and trainers. The output is available at /_build/html/index.html. ```shell make html ``` -------------------------------- ### Configure Docker Credentials Source: https://github.com/plone/training/blob/main/docs/plone-deployment/setup.md Logs into the Docker registry using provided credentials. This is necessary for pulling or pushing Docker images, such as those used for Plone deployments. ```shell docker login ``` -------------------------------- ### MyST Link to External Page Source: https://github.com/plone/training/blob/main/docs/contributing/writing-docs-guide.md Provides an example of linking to an external webpage using standard Markdown syntax. This is used for referencing external resources. ```Markdown Use [Shimmer](http://example.com) for cleaner whiter teeth. ``` -------------------------------- ### Build Live HTML Documentation Source: https://github.com/plone/training/blob/main/docs/contributing/setup-build.md Rebuilds Sphinx documentation automatically on changes and enables live-reloading in the browser. Accessible at http://0.0.0.0:8000/. ```shell make livehtml ``` -------------------------------- ### Volto Project Dependencies in package.json Source: https://github.com/plone/training/blob/main/docs/volto-customization/installation.md JSON snippet showing the dependencies section in a Volto project's package.json, utilizing workspace:* specifiers for local package resolution. ```json "dependencies": { "@plone/volto": "workspace:*", "@plone/registry": "workspace:*", "volto-teaser-tutorial": "workspace:*" }, ``` -------------------------------- ### Install Plone Backend and Frontend Source: https://github.com/plone/training/blob/main/docs/plone-deployment/project-new.md Installs both the Plone backend and frontend components, including all necessary dependencies. This process may take a few minutes. ```makefile make install ``` -------------------------------- ### Add HTML Meta Data Source: https://github.com/plone/training/blob/main/docs/contributing/setup-build.md Ensures that each chapter includes a meta data section if one is missing. Refer to authors-html-meta-data-label for more information. ```shell make html_meta ``` -------------------------------- ### Plone Backend Setup and Dependencies Source: https://github.com/plone/training/blob/main/docs/plone-deployment/project-edit.md This snippet outlines the necessary steps for integrating the 'pas.plugins.authomatic' package into the Plone backend. It involves adding the package to 'setup.py' for installation and updating 'dependencies.zcml' to load its configuration. ```Python # backend/setup.py # Add 'pas.plugins.authomatic' to install_requires # backend/src/ploneconf2024/dependencies.zcml # Load the package configuration ```