Skip to content

Commit

Permalink
Merge branch 'main' into nuclia_widget
Browse files Browse the repository at this point in the history
# Conflicts:
#	docs/_templates/components/search-field.html
  • Loading branch information
stevepiercy committed Nov 9, 2024
2 parents 3373a37 + d256d89 commit 722b66a
Show file tree
Hide file tree
Showing 118 changed files with 3,271 additions and 3,177 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/rtd-pr-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# .github/workflows/rtd-pr-preview.yml
name: readthedocs/actions
on:
pull_request_target:
types:
- opened
# Execute this action only on PRs that touch
# documentation files.
# paths:
# - "docs/**"

permissions:
pull-requests: write

jobs:
documentation-links:
runs-on: ubuntu-latest
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: "plone6"
single-version: "true"
6 changes: 1 addition & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,4 @@ jobs:
run: make test

- 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
run: make vale VALEOPTS="--no-exit --minAlertLevel='warning'"
25 changes: 25 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
commands:
# Cancel building pull requests when there aren't changes in the docs directory or YAML file.
# You can add any other files or directories that you'd like here as well,
# like your docs requirements file, or other files that will change your docs build.
#
# If there are no changes (git diff exits with 0) we force the command to return with 183.
# This is a special exit code on Read the Docs that will cancel the build immediately.
- |
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yaml requirements.txt;
then
exit 183;
fi
- make rtd-pr-preview
2 changes: 2 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ Packages = Microsoft

[*]
BasedOnStyles = Vale, Microsoft
Microsoft.Contractions = suggestion
Microsoft.Units = suggestion
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
VALEFILES := $(shell find $(DOCS_DIR) -type f -name "*.md" -print)
VALEOPTS ?=

# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
Expand Down Expand Up @@ -186,8 +187,8 @@ linkcheckbroken: bin/python ## Run linkcheck and show only broken links

.PHONY: vale
vale: bin/python ## Run Vale style, grammar, and spell checks
vale sync
vale --no-wrap $(VALEFILES)
bin/vale sync
bin/vale --no-wrap $(VALEOPTS) $(VALEFILES)
@echo
@echo "Vale is finished; look for any errors in the above output."

Expand All @@ -207,10 +208,10 @@ test: clean linkcheckbroken ## Clean docs build, then run linkcheckbroken
.PHONY: deploy
deploy: clean html

.PHONY: netlify
netlify:
.PHONY: rtd-pr-preview
rtd-pr-preview: ## Build pull request preview on Read the Docs
pip install -r requirements.txt
cd $(DOCS_DIR) && sphinx-build -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
cd $(DOCS_DIR) && sphinx-build -b html $(ALLSPHINXOPTS) ${READTHEDOCS_OUTPUT}/html/

.PHONY: all
all: clean vale linkcheck html ## Run checks and build html
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,3 @@ If you have issues, please open an issue in our [Issue Tracker](https://github.c
## License

The project is licensed under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/) by the [Plone Foundation](https://plone.org).


## The landing page

The code for the landing page at https://training.plone.org is in another repository at https://github.com/plone/training.plone.org.
Binary file modified docs/_static/plone_training_config.zip
Binary file not shown.
30 changes: 12 additions & 18 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,36 +89,27 @@
# Options for the linkcheck builder
# Ignore localhost
linkcheck_ignore = [
r"http://localhost",
r"https?://.*localhost.*",
r"http://0.0.0.0",
r"http://127.0.0.1",
r"http://example.com",
r"https://github.com/plone/training/issues/new/choose", # requires auth
r"https://github.com/search", # always rate limited, causes linkcheck to stall
r"https://docs.github.com/en/get-started/.*", # GitHub docs require auth
r"https://github.com/plone/mockup/blob/master/mockup/.jshintrc", # TODO: remove when javascript/development-process.md is updated. See https://github.com/plone/training/issues/611
r"https://www.packtpub.com/.*", # test say 500 Server Error but manually they work
r"https://www.dipf.de/.*", # a timeout from time to time
r"https?://plone-conference.localhost.*",
r"https://www.linode.com/.*", # test say 500 Server Error but manually they work
r"https://www.packtpub.com/.*", # test say 500 Server Error but manually they work
# ### Start of list of anchored links
# Prior to each PloneConf, uncomment these lines to verify that the links work,
# although the anchor cannot be found.
# GitHub rewrites anchors with JavaScript.
# See https://github.com/plone/training/issues/598#issuecomment-1105168109
"https://github.com/collective/awesome-volto#addons",
"https://github.com/collective/collective.easyform#collectivez3cformnorobots-support",
"https://github.com/collective/collective.easyform#recaptcha-support",
"https://github.com/plone/plone.app.contentlisting/#methods-of-contentlistingobjects",
"https://github.com/plone/plone.app.contenttypes#changing-the-base-class-for-existing-objects",
"https://plone.github.io/mockup/dev/#pattern/autotoc",
"https://plone.github.io/mockup/dev/#pattern/modal",
"https://plone.github.io/mockup/dev/#pattern/moment",
"https://github.com/collective/collective.exportimport#faq-tips-and-tricks",
"https://github.com/plone/plone.app.contenttypes/tree/2.2.x#migration",
# Ignore github.com pages with anchors
r"https://github.com/.*#.*",
r"https://plone.github.io/mockup/dev/.*#.*",
# Ignore other specific anchors
"https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Keywords",
"https://github.com/plone/plone.restapi/blob/afde2a940d2518e061eb3fe30093093af55e3a50/src/plone/restapi/services/content/configure.zcml#L15-L20",
"https://github.com/plone/plone.rest#cors",
"https://github.com/plone/plone.docker#for-basic-usage",
"https://github.com/nodejs/release#release-schedule",
# ### End of list of anchored links
]
linkcheck_allowed_redirects = {
Expand All @@ -128,6 +119,7 @@
linkcheck_anchors = True
linkcheck_timeout = 5
linkcheck_retries = 1
linkcheck_rate_limit_timeout = 10.0

# The suffix of source filenames.
source_suffix = {
Expand Down Expand Up @@ -173,7 +165,7 @@

html_theme_options = {
"logo": {
"text": "Plone Training 2023",
"text": "Plone Training 2024",
},
"path_to_docs": "docs",
"repository_branch": "main",
Expand Down Expand Up @@ -201,6 +193,8 @@
"plone5docs": ("https://5.docs.plone.org/", None),
"plone6docs": ("https://6.docs.plone.org/", None),
"python": ("https://docs.python.org/3/", None),
"training2023": ("https://2023.training.plone.org/", None),
"training2022": ("https://2022.training.plone.org/", None),
}


Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/authors.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ An [online demo of all lexers that Pygments supports](https://pygments.org/demo/
You can also use the [`pygmentize`](https://pygments.org/docs/cmdline/) binary.

When using the online lexer, if any red-bordered rectangles appear, then the lexer for Pygments interprets your snippet as not valid.
You can search the [Pygments issue tracker](https://github.com/pygments/pygments/search) for possible solutions, or submit a pull request to enhance the lexer.
You can search the [Pygments issue tracker](https://github.com/pygments/pygments/issues?q=) for possible solutions, or submit a pull request to enhance the lexer.


## Synchronize the Browser While Editing
Expand Down
7 changes: 7 additions & 0 deletions docs/contributing/setup-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ make vale

See the output on the console for suggestions.

You can also pass options to vale in the `VALEOPTS` environment variable.
In the following example, vale will not return a non-zero exit code when there are errors and will display warnings or errors only, not suggestions.

```shell
make vale VALEOPTS="--no-exit --minAlertLevel='warning'"
```


### `html_meta`

Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/writing-docs-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ This will greatly improve the editing and maintenance of your documentation.
## General Documentation Writing References

- [Write the Docs - Documentation Guide](https://www.writethedocs.org/guide/)
- [A Guide to Em Dashes, En Dashes, and Hyphens](https://www.merriam-webster.com/words-at-play/em-dash-en-dash-how-to-use)
- [A Guide to Em Dashes, En Dashes, and Hyphens](https://www.merriam-webster.com/grammar/em-dash-en-dash-how-to-use)


### English grammar, spelling, punctuation, and syntax
Expand Down
2 changes: 1 addition & 1 deletion docs/effective-volto/addons/semanticui.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ path).

Volto's theme is called Pastanaga. It's a typical Semantic-UI theme. For
the new elements and components that don't exist in Semantic-UI, the Pastanaga
theme uses the [extras](https://github.com/plone/volto/tree/master/theme/themes/pastanaga/extras) folder. The downside is that they aren't fully using the Semantic-UI theming engine.
theme uses the [extras](https://github.com/plone/volto/tree/main/packages/volto/theme/themes/pastanaga/extras) folder. The downside is that they aren't fully using the Semantic-UI theming engine.

The key to success in Volto theming is to understand how Semantic-UI's theming
engine works and how to manipulate it. Reading the `theme.less` and
Expand Down
2 changes: 1 addition & 1 deletion docs/effective-volto/architecture/bootstrap-volto.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ In case you need production ready deployment, check the training {doc}`/plone-de
The example above does not persist yet any changes you make through Volto in
the Plone docker container backend! For this you need to map the /data directory
in the container properly. Check Docker
[storage documentation](https://docs.docker.com/storage/) for more information.
[storage documentation](https://docs.docker.com/engine/storage/) for more information.
As a quick example: if you add
`--mount type=bind,source="$(pwd)/plone-data",target=/data`
Expand Down
2 changes: 1 addition & 1 deletion docs/effective-volto/architecture/multilingual.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This feature has to be enabled and configured both in the backend and in the fro
### Backend

Volto provides support for Plone's Multilingual feature.
You need to install Multiligual support in Plone (plone.app.multilingual add-on), that comes available by default since Plone 5 and can be installed in Plone's Add-ons control panel.
You need to install Multiligual support in Plone (plone.app.multilingual add-on), that comes available by default since Plone 5 and can be installed in Plone's add-ons control panel.
This will setup the backend and it will create the Language Root Folders (LRFs) (/de, /en, etc.)

From your Python policy add-on in `profiles/default/registry.xml`:
Expand Down
2 changes: 1 addition & 1 deletion docs/effective-volto/architecture/razzle.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ It defines the Babel configuration baseline, and allows you to extend it as well
It has all the modern development tools (HMR, etc) and a plugin system that you can use from your projects.

```{note}
While Razzle is stable, it doesn't see a lot of active development. A possible replacement could be [vite.js](https://vitejs.dev/) and there's already a Proof of Concept that integrates it with Volto.
While Razzle is stable, it doesn't see a lot of active development. A possible replacement could be [vite.js](https://vite.dev/) and there's already a Proof of Concept that integrates it with Volto.
```
2 changes: 1 addition & 1 deletion docs/effective-volto/deployment/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ It is recommended that you follow the best practices explained in the "Installin

You'll find in the Volto repository a simple `docker-compose` example:

https://github.com/plone/volto/blob/main/docker-compose.yml
https://github.com/plone/volto/blob/main/packages/volto/docker-compose.yml

```shell
docker-compose -f <following_snippet.yml> up
Expand Down
4 changes: 2 additions & 2 deletions docs/effective-volto/development/criticalCSS.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ npx @plone/critical-css-cli -h
npx @plone/critical-css-cli https://example.com -o critical.css
```

You can pass multiple URLs and screen dimmensions and the extracted CSS will be
You can pass multiple URLs and screen dimensions and the extracted CSS will be
optimized (duplicate rules will be eliminated, etc). See the [Advanced preset
of cssnano](https://cssnano.co/docs/what-are-optimisations/) for details. One last
of cssnano](https://cssnano.github.io/cssnano/docs/what-are-optimisations/) for details. One last
optimization applied strips all `@import` declarations from the generated CSS.

After that, copy this file to the `public/critical.css` path (configurable
Expand Down
2 changes: 1 addition & 1 deletion docs/effective-volto/development/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ component hierarchy, inspect props, hooks, HOCs, etc.
Redux Dev Tools allows you to observe the Redux actions and inspect the store
state.

You can add `debugger` lines in your code, to trigger breakpoints in the browser. To debug the server, you need to hook the [Chrome DevTools](https://nodejs.org/en/docs/guides/debugging-getting-started). Note that there's multiple threads hooked into the inspector (server, client, hotreload process), so you'll have to find the one that coresponds to the server.
You can add `debugger` lines in your code, to trigger breakpoints in the browser. To debug the server, you need to hook the [Chrome DevTools](https://nodejs.org/docs/latest/api/debugger.html). Note that there's multiple threads hooked into the inspector (server, client, hotreload process), so you'll have to find the one that coresponds to the server.
2 changes: 1 addition & 1 deletion docs/effective-volto/development/icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ myst:

# Icons

Volto has a pre-defined set of SVG icons from the Pastanaga UI icon system. You can find them in the code repo in [here](https://github.com/plone/volto/tree/master/src/icons). They are also browseable in https://pastanaga.io/icons/.
Volto has a pre-defined set of SVG icons from the Pastanaga UI icon system. You can find them in the code repo in [here](https://github.com/plone/volto/tree/main/packages/volto/src/icons). They are also browseable in https://pastanaga.io/icons/.

The following example shows how to display one of these icons.

Expand Down
2 changes: 1 addition & 1 deletion docs/effective-volto/getting-started/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Finally, install `yarn` according to the [Plone documentation](https://6.docs.pl

### Docker (optional, but recommended)

Install `Docker` according to the [official documentation](https://docs.docker.com/get-docker/).
Install `Docker` according to the [official documentation](https://docs.docker.com/get-started/get-docker/).

Generate a new Plone 6 Project:

Expand Down
2 changes: 1 addition & 1 deletion docs/effective-volto/testing/acceptance.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ dispatch(
);
```
More information about this: https://www.cypress.io/blog/2018/11/14/testing-redux-store/
More information about this: https://www.cypress.io/blog/testing-redux-store
#### Volto settings
Expand Down
3 changes: 1 addition & 2 deletions docs/effective-volto/testing/storybook.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ export const Breadcrumb = injectIntl(({ children, ...args }) => {

Notice the `<Wrapper>` component, which provides a minimal Volto "environment context" that to ensure that the deeply-integrated Volto components can function.

To create a static build of your storybook (which you can publish to a static
http server, for example github.io pages), you need to run:
To create a static build of your storybook (where you can publish to a static http server, for example [GitHub pages](https://pages.github.com/)), you need to run:

```
yarn build-storybook
Expand Down
13 changes: 9 additions & 4 deletions docs/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ S3
NFS
[Network File System](https://en.wikipedia.org/wiki/Network_File_System).
Amazon Opsworks
[AWS OpsWorks](https://aws.amazon.com/opsworks/) is a configuration management service that uses Chef, an automation platform that treats server configurations as code.
Ansible
[Ansible](https://www.ansible.com/) is an open source automation platform.
Ansible can help you with configuration management, application deployment, task automation.
Expand Down Expand Up @@ -187,7 +184,7 @@ Transpilation
ES6
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.
[Ecma International](https://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 @@ -277,6 +274,14 @@ mxdev
plonecli
A Plone CLI for creating Plone packages. [plonecli usage](https://github.com/plone/plonecli)
Cookieplone
[Cookieplone](https://github.com/plone/cookieplone) is the method to create a Plone project.
You can use Cookieplone to build a backend add-on, a new Volto add-on, or a full project with both backend and frontend.
Cookieplone simplifies the process using robust Cookiecutter templates from {term}`cookieplone-templates`.
cookieplone-templates
[`cookieplone-templates`](https://github.com/plone/cookieplone-templates) is a collection of templates used by {term}`Cookieplone`.
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 configuration settings.
Expand Down
Loading

0 comments on commit 722b66a

Please sign in to comment.