Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into nuclia
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/build_deploy_staging.yml
  • Loading branch information
stevepiercy committed May 21, 2024
2 parents bfea5e6 + a1594f0 commit fee5248
Show file tree
Hide file tree
Showing 32 changed files with 334 additions and 341 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/build_deploy_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,20 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.12"
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -q -r requirements.txt -c constraints.txt
pip freeze
sudo snap install --edge vale
- name: Run Vale
run: |
git clone https://github.com/errata-ai/Microsoft.git
cp -r ./Microsoft/Microsoft ./styles
VALEFILES=$(find ./docs/ -type f -name "*.md" -print)
vale --no-exit $VALEFILES
- name: Run linkcheck
run: make linkcheck
# TODO Raise linkcheck barrier again.
# - name: Run linkcheck
# run: make linkcheck

- name: Prepare deploy
run: make deploy
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.12"

- name: Install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = $(realpath bin/sphinx-build)
SPHINXAUTOBUILD = $(realpath bin/sphinx-autobuild)
SPHINXBUILD = "$(realpath bin/sphinx-build)"
SPHINXAUTOBUILD = "$(realpath bin/sphinx-autobuild)"
PAPER =
DOCS_DIR = ./docs/
BUILDDIR = ../_build
Expand Down
4 changes: 0 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,6 @@
'<meta property="og:locale" content="en_US" />',
]

# -- sphinx_copybutton -----------------------
copybutton_prompt_text = r"^ {0,2}\d{1,3}"
copybutton_prompt_is_regexp = True


# -- sphinx.ext.todo -----------------------
todo_include_todos = True # Uncomment to show todos.
Expand Down
6 changes: 3 additions & 3 deletions docs/effective-volto/getting-started/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ pip install cookiecutter

### nvm, Node.JS, Yeoman, and Yarn

First install `nvm` and latest Node.JS according to the [Plone documentation](https://6.docs.plone.org/volto/getting-started/install.html#install-nvm-nodejs-version-manager).
First install `nvm` and latest Node.JS according to the [Plone documentation](https://6.docs.plone.org/install/create-project.html#nvm).

After that, install Yeoman according to the [Plone documentation](https://6.docs.plone.org/volto/getting-started/install.html#yeoman).
After that, install Yeoman according to the [Plone documentation](https://6.docs.plone.org/install/create-project.html#yeoman-and-the-volto-boilerplate-generator).

Finally, install `yarn` according to the [Plone documentation](https://6.docs.plone.org/volto/getting-started/install.html#yarn-nodejs-package-manager).
Finally, install `yarn` according to the [Plone documentation](https://6.docs.plone.org/install/create-project.html#yarn).

### Docker (optional, but recommended)

Expand Down
21 changes: 12 additions & 9 deletions docs/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Chef
[A configuration management tool written in Ruby and Erlang](https://www.chef.io/products/chef-infra/).
CloudFormation
[AWS CloudFormation](https://aws.amazon.com/cloudformation/) gives developers and systems administrators an way to create and manage a collection of related AWS resources, provisioning and updating them in an orderly and predictable fashion.
[AWS CloudFormation](https://aws.amazon.com/cloudformation/) gives developers and systems administrators a way to create and manage a collection of related AWS resources, provisioning and updating them in an orderly and predictable fashion.
Travis CI
Travis CI is a hosted, distributed continuous integration service used to build and test software projects hosted at GitHub.
Expand All @@ -92,7 +92,8 @@ Dexterity
[Dexterity](https://github.com/plone/plone.dexterity), the base framework for building content types, both through-the-web and as filesystem code for Zope.
Dublin Core
The Dublin Core Schema is a small set of vocabulary terms that can be used to describe web resources (video, images, web pages, etc.), as well as physical resources such as books or CDs, and objects like artworks.
The Dublin Core Schema is a small set of vocabulary terms that can be used to describe web resources (video, images, web pages, and other online content).
It can also be used to describe physical resources such as books or CDs, and objects like artworks.
ZMI
The Zope Management Interface.
Expand All @@ -118,7 +119,7 @@ Rapido application
It is a folder containing templates, Python code, and YAML files.
block
Blocks display a chunk of HTML which can be inserted in your Plone pages.
Blocks display chunks of HTML that can be inserted into your Plone pages.
element
Elements are the dynamic components of your blocks.
Expand Down Expand Up @@ -155,14 +156,14 @@ Webpack
Webpack entrypoint
The main files generated by webpack as a result.
They typically contain the application source code based on modules bundled together, but it can also include other resources, such as static resources.
It can contain code to automatically trigger the load of other JavaScript code files called "chunks".
They can contain code to automatically trigger the load of other JavaScript code files called "chunks".
Babel
A JavaScript compiler that "transpiles" newer standards JavaScript to something that any browser can load.
Express
A JavaScript HTTP server with a simple API to build custom applications.
Volto uses it as its server.
[Express](https://expressjs.com/) is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.
Volto uses Express.
Server-Side Rendering (SSR)
When first loading any Plone page, users will get HTML markup that closely matches the final DOM structure of the React components used to render that page.
Expand All @@ -184,7 +185,9 @@ Transpilation
The transformation of JavaScript code that uses advanced language features, unavailable for some browsers, to code rewritten to support them.
ES6
ECMAScript 6, a newer version of the JavaScript language.
ECMAScript 6
[ECMAScript 6 (ES6)](https://262.ecma-international.org/6.0/) is a scripting language specification on which [JavaScript](https://developer.mozilla.org/en-US/docs/Glossary/JavaScript) is based.
[Ecma International](https://www.ecma-international.org/) is in charge of standardizing ECMAScript.
mrs-developer
Also called "missdev", a tool similar to buildout's `mr.developer`.
Expand Down Expand Up @@ -276,7 +279,7 @@ plonecli
GenericSetup
[GenericSetup](https://5.docs.plone.org/develop/addons/components/genericsetup.html) is a framework to modify the Plone site during add-on package installation and uninstallation.
It provides XML-based rules to change the site settings.
It provides XML-based rules to change the configuration settings.
cookiecutter-plone-starter
[cookiecutter-plone-starter](https://github.com/collective/cookiecutter-plone-starter) is a `cookiecutter` template, created by the Plone community, to bootstrap
Expand All @@ -294,4 +297,4 @@ Nginx
Varnish
[Varnish](https://varnish-cache.org/intro/) is a high-performance HTTP accelerator and reverse proxy caching server designed to speed up web applications by caching content in memory.
It serves stored content to users quickly, reducing the load on web servers and enhancing the overall user experience by delivering web pages at high speed.
It serves stored content to users quickly, reducing the load on web servers and enhancing the overall user experience by delivering web pages at high speed.
2 changes: 1 addition & 1 deletion docs/mastering-plone-5/behaviors_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,6 @@ We must add the behavior to {file}`profiles/default/types/talk.xml`:
</object>
```

[plone5_fieldset]: https://5.docs.plone.org/develop/addons/schema-driven-forms/customising-form-behaviour/fieldsets.html?highlight=fieldset
[plone5_fieldset]: https://5.docs.plone.org/develop/addons/schema-driven-forms/customising-form-behaviour/fieldsets.html
[plone5_iformfieldprovider]: https://5.docs.plone.org/external/plone.app.dexterity/docs/advanced/custom-add-and-edit-forms.html?highlight=iformfieldprovider#edit-forms
[plone5_plone.supermodel]: https://5.docs.plone.org/external/plone.app.dexterity/docs/schema-driven-types.html#schema-interfaces-vs-other-interfaces
2 changes: 1 addition & 1 deletion docs/mastering-plone/about_mastering.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Thank you for reading and your charity with non-native English speakers / writer

## Upcoming Trainings

Next Plone Conference, usually in october.
Next Plone Conference, usually in October.
Announced on [plone.org](https://plone.org)

If you want to have an on-site training or want to attend a public training, please ask for trainings on [community.plone.org](https://community.plone.org) or one of the {ref}`trainers<about-trainers-label>`.
Expand Down
16 changes: 8 additions & 8 deletions docs/mastering-plone/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ myst:
% TODO Short appetizer on all the fancy features.

Now we create a Plone instance and take a look at all the features you can use as an integrator.
Developers get a glimps on the features that can be modified easily.
Developers get a glimpse on the features that can be modified easily.

(features-start-stop-label)=

Expand Down Expand Up @@ -44,7 +44,7 @@ Zope instance is up and running, ready to create a Plone instance.

We now have a running Zope with a database, but no content.

Push the botton {guilabel}`Create a new Plone site`.
Push the button {guilabel}`Create a new Plone site`.
Log in with `admin` and password `secret`.
The initial login is defined in file `instance.yaml`.
You should change your password in production sites via `http://localhost:8080/acl_users/users/manage_users`.
Expand Down Expand Up @@ -213,11 +213,11 @@ Edit the front page:
- Change the title to `Plone Conference 2050, Solis Lacus, Mars`.
- Remove the text blocks below the title by selecting all and deleting them.
- Add some dummy text.
- Click somewhere in the text, press return and see the block beeing splitted.
- Click somewhere in the text, press return and see the block being splitted.
- Save the page.

If you have already content in your instance, you may want to delete it.
Go to `/contents` by clicking the folder icon in the toolbar.
If there is existing content in your instance, you might consider removing it.
Navigate to `/contents` by clicking the folder icon in the toolbar.
Select all objects and delete them.

Create a site structure:
Expand All @@ -238,7 +238,7 @@ The view of the newly created site structure
```

Additional to these conference pages we also want some news and events.
We want a registration page and an a protected section for the conference team.
We want a registration page and a protected section for the conference team.

- Add a page "News"
- In `/news`: Add a News Item "Conference Website online!" with some image
Expand Down Expand Up @@ -274,7 +274,7 @@ Page

News Item

: Basically a page with an image and an image caption to be used for press releases an such.
: Basically a page with an image and an image caption to be used for press releases and such.

```{figure} _static/features_add_a_news_item.png
```
Expand All @@ -289,7 +289,7 @@ Event
Image

: Like file but png, jpeg or other image types.
The Image content typ has an image field.
The Image content type has an image field.
Values of the image field are saved in multiple scales to be accessible easily when rendering.

```{figure} _static/features_add_a_image.png
Expand Down
2 changes: 1 addition & 1 deletion docs/mastering-plone/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ You have two options:
### Option 1: Frontend from scratch with Volto generator


{ref}`plone6docs:frontend-getting-started-installing-volto-label`
Follow the instructions of `docs.plone.org`: {doc}`plone6docs:volto/recipes/creating-project`.


### Option 2. Start with prepared training project `volto-ploneconf` with all code for the training
Expand Down
12 changes: 5 additions & 7 deletions docs/mastering-plone/relations.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ directives.widget(
)
```

`basePath` can also be a method. In this exmaple we use the helper-method `plone.app.multilingual.browser.interfaces.make_relation_root_path`.
`basePath` can also be a method. In this example we use the helper-method `plone.app.multilingual.browser.interfaces.make_relation_root_path`.

```{code-block} python
:emphasize-lines: 13
Expand All @@ -129,14 +129,16 @@ relationlist_field = RelationList(
directives.widget(
"relationlist_field",
RelatedItemsFieldWidget,
pattern_options=make_relation_root_path,
pattern_options={
"basePath": make_relation_root_path,
}
)
```

### Using the search mode of the Related Items Widget

```{note}
These settings only have a effect in Plone 6 Classic.
These settings only have an effect in Plone 6 Classic.
```

So far we only used the vocabulary `plone.app.vocabularies.Catalog` that returns the full content tree.
Expand Down Expand Up @@ -301,10 +303,6 @@ RelationList:

## Using different widgets for relations

```{todo}
Support for `StaticCatalogVocabulary` in Volto is currently still missing.
```

Often the standard widget for relations is not what you want since it can be hard to navigate to the content you want to relate to.

If you want to use checkboxes, radiobuttons or a selection-dropdown you need to use `StaticCatalogVocabulary` instead of `CatalogSource` to specify your options.
Expand Down
4 changes: 2 additions & 2 deletions docs/mastering-plone/volto_frontpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ To understand why we need a collection criterion for a dynamic frontpage in Volt
:align: left
```

In the sidebar we see the `criteria` selection and if we click there, it'll show some of the selectable criterions ordered in categories like the following:
In the sidebar, we see the {guilabel}`Criteria` select menu, and if we click there, it'll show some of the selectable criteria ordered in categories like the following:

- `Metadata` contains indexes that are counting as metadata like Type (means Portal Types) and Review State
- `Text` contains indexes that are counting as text-data like Description and Searchable Text
- `Dates` contains indexes which are working with date-data like Effective Date and Creation Date

To get all talks we marked as `featured` we have to get the listing block to recognize our newly created index.
This means we have to add our index to the collection criterions, so we can select it.
This means we have to add our index to the collection criteria, so we can select it.

To add our new index as a criterion to be appliable in a listing block or a collection, we have to switch to our `backend`. There we have to create a plone.app.registry record for our index. This can be achieved by adding a new file {file}`profiles/default/registry/querystring.xml`:

Expand Down
4 changes: 2 additions & 2 deletions docs/theming/theme_diazo.md
Original file line number Diff line number Diff line change
Expand Up @@ -707,9 +707,9 @@ For example if you install a JQuery library you will find all JavaScript and CSS

## Adjust the layout and manifest files

We need to adjust a bit the `manifest.ini`, to reflect the layout structure of the Bootstrap theme we got.
We need to adjust a bit the `manifest.cfg`, to reflect the layout structure of the Bootstrap theme we got.

By default the `manifest.ini` will look like this:
By default the `manifest.cfg` will look like this:

```ini
[theme]
Expand Down
2 changes: 1 addition & 1 deletion docs/theming/theme_scratch.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ If everything works as expected next step is to start up your instance for the f

## Startup

We recommend to swith to your SDK here. If you're using Visual Studio Code you can open a terminal `Terminal > New Terminal` and run the following commands inside your editor. This helps you to keep track of windows and processes.
We recommend to switch to your IDE here. If you're using Visual Studio Code you can open a terminal `Terminal > New Terminal` and run the following commands inside your editor. This helps you to keep track of windows and processes.

Start your instance for the very first time:

Expand Down
22 changes: 10 additions & 12 deletions docs/volto_customization/blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ In our addon `volto-teaser-tutorial` we will step by step extend each component

The most simple customization is the View of the Teaser. The volto core teaser block configration (in `omelette/src/config/Blocks.jsx`) looks like:

```{code-block} js
```js
teaser: {
id: 'teaser',
title: 'Teaser',
Expand All @@ -51,31 +50,30 @@ The most simple customization is the View of the Teaser. The volto core teaser b
Every block in Volto has Edit and View components.
You can customize these individually by either shadowing or directly in the confuguration (`index.js` of your addon) like this:

```{code-block} js
import MyTeaserView from 'volto-teaser-tutorial/components/Blocks/Teaser/View'
```js
import MyTeaserView from "volto-teaser-tutorial/components/Blocks/Teaser/View";

const applyConfig = (config) => {
config.blocks.blocksConfig.teaser.view = MyTeaserView
config.blocks.blocksConfig.teaser.view = MyTeaserView;
return config;
}
};

export default applyConfig;
```

Of course we need to add our custom `MyTeaserView` component in our addon.
From the root of the project that is `src/addon/volto-teaser-tutorial/src/components/Blocks/Teaser/View.jsx`:

```{code-block} jsx
import React from 'react';
import TeaserBody from '@plone/volto/components/manage/Blocks/Teaser/Body';
import { withBlockExtensions } from '@plone/volto/helpers';
```jsx
import React from "react";
import TeaserBody from "@plone/volto/components/manage/Blocks/Teaser/Body";
import { withBlockExtensions } from "@plone/volto/helpers";

const TeaserView = (props) => {
return <TeaserBody {...props} extraProps={{ foo: 'bar' }} />;
return <TeaserBody {...props} extraProps={{ foo: "bar" }} />;
};

export default withBlockExtensions(TeaserView);
```

Here, the View component renders a TeaserBody which will be a result of an active variation, we will come to that in later chapters.
Loading

0 comments on commit fee5248

Please sign in to comment.