From 58fef0e65c7e411d4f5bfe214527feb0b761395b Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 2 Apr 2023 02:52:44 -0700 Subject: [PATCH 01/35] Fix build path --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 353cc64f3..04eb509a9 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ SPHINXBUILD = $(realpath bin/sphinx-build) SPHINXAUTOBUILD = $(realpath bin/sphinx-autobuild) PAPER = DOCS_DIR = ./docs/ -BUILDDIR = ../_build/ +BUILDDIR = ../_build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 From 8868e5186d64583f73deaa89d8934bddd4c9dca2 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 2 Apr 2023 02:53:01 -0700 Subject: [PATCH 02/35] Add keywords to silence warning --- docs/contributing/setup-build.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contributing/setup-build.md b/docs/contributing/setup-build.md index 97cc0729a..fdd964262 100644 --- a/docs/contributing/setup-build.md +++ b/docs/contributing/setup-build.md @@ -4,7 +4,7 @@ myst: "description": "How to set up the training locally" "property=og:description": "How to set up the training locally" "property=og:title": "Building and Checking the Quality of Documentation" - "keywords": "" + "keywords": "Build, Check, quality, documentation" --- (setup-build-label)= From 760a084ac6ea17b21e7a83958e9ab35a54fcdb2a Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 2 Apr 2023 03:01:31 -0700 Subject: [PATCH 03/35] Fix syntax --- docs/plone-deployment/new-project.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/plone-deployment/new-project.md b/docs/plone-deployment/new-project.md index 092ef4400..b207baf82 100644 --- a/docs/plone-deployment/new-project.md +++ b/docs/plone-deployment/new-project.md @@ -86,7 +86,7 @@ The Plone Community. Now, change to your project directory {file}`plone-conference`. -```{code-base} shell +```shell cd plone-conference ``` From 82c039fc8844edc6261b4bc452d98d11223f03d0 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 2 Apr 2023 03:01:43 -0700 Subject: [PATCH 04/35] Add html meta stuff --- docs/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/index.md b/docs/index.md index 085f11913..2e5e14262 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,10 +1,10 @@ --- myst: html_meta: - "description": "" - "property=og:description": "" - "property=og:title": "" - "keywords": "" + "description": "Plone Training" + "property=og:description": "Plone Training" + "property=og:title": "Plone Training" + "keywords": "Plone, Training" --- # Plone Training From 7084c87391cb2293cd2769778dbbaf91465a1833 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 2 Apr 2023 03:03:53 -0700 Subject: [PATCH 05/35] Fix html meta stuff --- docs/testing/index.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/testing/index.md b/docs/testing/index.md index 9239a7a4b..cae744543 100644 --- a/docs/testing/index.md +++ b/docs/testing/index.md @@ -1,6 +1,10 @@ --- -html_meta: - description: Best practices for testing Plone add-ons +myst: + html_meta: + "description": "Best practices for testing Plone add-ons" + "property=og:description": "Best practices for testing Plone add-ons" + "property=og:title": "Testing Plone" + "keywords": "Plone, testing, training" --- (testing-plone-label)= From 825c625e860bdc1bbd13685d53fbc13a75d7c239 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 2 Apr 2023 03:06:58 -0700 Subject: [PATCH 06/35] Fix html meta stuff --- docs/theming/diazo-notes.md | 10 ++++++++++ docs/theming/index.md | 8 ++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/theming/diazo-notes.md b/docs/theming/diazo-notes.md index f91e05cf0..d493a3f84 100644 --- a/docs/theming/diazo-notes.md +++ b/docs/theming/diazo-notes.md @@ -1,3 +1,13 @@ +--- +myst: + html_meta: + "description": "Diazo notes" + "property=og:description": "Diazo notes" + "property=og:title": "Diazo notes" + "keywords": "Diazo, Plone, training" +--- + +# Diazo notes ## create addon and theme diff --git a/docs/theming/index.md b/docs/theming/index.md index 4e3946eab..ff6c8660a 100644 --- a/docs/theming/index.md +++ b/docs/theming/index.md @@ -1,6 +1,10 @@ --- -html_meta: - description: Adjusting the visual representation of Plone with {term}`Diazo` +myst: + html_meta: + "description": "Adjusting the visual representation of Plone with Diazo" + "property=og:description": "Adjusting the visual representation of Plone with Diazo" + "property=og:title": "Plone 6 Classic UI Theming" + "keywords": "Plone, Classic UI, theming, training" --- (theming-label)= From 5821818dd2e44fa21ef19740c2a097cdce6742b8 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 2 Apr 2023 03:09:11 -0700 Subject: [PATCH 07/35] Fix html meta stuff --- docs/theming_plone_5/index.md | 8 ++++++-- docs/transmogrifier/index.md | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/theming_plone_5/index.md b/docs/theming_plone_5/index.md index f1d9b747c..b4329ca3a 100644 --- a/docs/theming_plone_5/index.md +++ b/docs/theming_plone_5/index.md @@ -1,6 +1,10 @@ --- -html_meta: - description: Adjusting the visual representation of Plone with {term}`Diazo` +myst: + html_meta: + "description": "Adjusting the visual representation of Plone with Diazo" + "property=og:description": "Adjusting the visual representation of Plone with Diazo" + "property=og:title": "Plone 5 Theming" + "keywords": "Plone, Classic UI, theming, training" --- (plone-5-theming-label)= diff --git a/docs/transmogrifier/index.md b/docs/transmogrifier/index.md index f811a900c..dd164601d 100644 --- a/docs/transmogrifier/index.md +++ b/docs/transmogrifier/index.md @@ -1,6 +1,10 @@ --- -html_meta: - description: Migrating website content into a Plone site using Transmogrifier +myst: + html_meta: + "description": "Migrating website content into a Plone site using Transmogrifier" + "property=og:description": "Migrating website content into a Plone site using Transmogrifier" + "property=og:title": "Migrating Content with Transmogrifier" + "keywords": "Plone, Migrate, Content, Transmogrifier" --- (transmogrifier-label)= From d7d816e1cc9aea56705a4dfc1778bf12030c8de2 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 2 Apr 2023 03:10:13 -0700 Subject: [PATCH 08/35] Fix html meta stuff --- docs/volto/index.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/volto/index.md b/docs/volto/index.md index c10d69d8a..45e5bb391 100644 --- a/docs/volto/index.md +++ b/docs/volto/index.md @@ -1,6 +1,10 @@ --- -html_meta: - description: Learn how to create your own website based on Volto +myst: + html_meta: + "description": "Learn how to create your own website based on Volto" + "property=og:description": "Learn how to create your own website based on Volto" + "property=og:title": "Volto" + "keywords": "Plone, Volto, training" --- (volto-label)= From 339ceb0f7d78cefb856720a579fa643686ee15a0 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 2 Apr 2023 03:11:22 -0700 Subject: [PATCH 09/35] Fix html meta stuff --- docs/voltoaddons/index.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/voltoaddons/index.md b/docs/voltoaddons/index.md index 102767ff8..44c793f07 100644 --- a/docs/voltoaddons/index.md +++ b/docs/voltoaddons/index.md @@ -1,6 +1,10 @@ --- -html_meta: - description: Learn how to develop Volto add-ons and other useful Volto patterns +myst: + html_meta: + "description": "Learn how to develop Volto add-ons and other useful Volto patterns" + "property=og:description": "Learn how to develop Volto add-ons and other useful Volto patterns" + "property=og:title": "Volto add-ons development" + "keywords": "Plone, Volto, add-on, development, training" --- (voltoaddons-label)= From 11c3924704ef628e2d767c26d3d20524ceed14c5 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 2 Apr 2023 03:13:49 -0700 Subject: [PATCH 10/35] Fix html meta stuff --- docs/voltohandson/index.md | 8 ++++++-- docs/voltohandson/introtovolto.md | 11 ++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/voltohandson/index.md b/docs/voltohandson/index.md index 1f01c6983..e41a036cc 100644 --- a/docs/voltohandson/index.md +++ b/docs/voltohandson/index.md @@ -1,6 +1,10 @@ --- -html_meta: - description: Learn how to quickly bootstrap and customize a Volto project +myst: + html_meta: + "description": "Learn how to quickly bootstrap and customize a Volto project" + "property=og:description": "Learn how to quickly bootstrap and customize a Volto project" + "property=og:title": "Volto Hands-On" + "keywords": "Plone, Volto, Hands-On, training" --- (voltohandson-label)= diff --git a/docs/voltohandson/introtovolto.md b/docs/voltohandson/introtovolto.md index ed01a29ee..6d084ac64 100644 --- a/docs/voltohandson/introtovolto.md +++ b/docs/voltohandson/introtovolto.md @@ -1,9 +1,10 @@ --- -html_meta: - 'description': 'How volto functions' - 'property=og:description': 'Learn the inner workings of volto' - 'property=og:title': 'Inner workings of volto' - 'keywords': 'Plone, Volto, Training,' +myst: + html_meta: + "description": "How volto functions" + "property=og:description": "Learn the inner workings of Volto" + "property=og:title": "Inner workings of Volto" + "keywords": "Plone, Volto, training" --- # Inner workings of Volto From 0ee6abaf10e6ed9f2ff6bbae488039ca8a1ed185 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 2 Apr 2023 03:52:17 -0700 Subject: [PATCH 11/35] Fix html meta stuff --- docs/wsgi/index.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/wsgi/index.md b/docs/wsgi/index.md index 00b0dde7b..1754e3d52 100644 --- a/docs/wsgi/index.md +++ b/docs/wsgi/index.md @@ -1,6 +1,10 @@ --- -html_meta: - description: Deploying and Operating Plone behind a WSGI server +myst: + html_meta: + "description": "Deploying and Operating Plone behind a WSGI server" + "property=og:description": "Deploying and Operating Plone behind a WSGI server" + "property=og:title": "Deploying and Operating Plone behind a WSGI server" + "keywords": "Plone, deploy, WSGI, training" --- (wsgi-label)= From fa588f862dc2a18fa7b73128e0bf240107d89c54 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 2 Apr 2023 03:53:26 -0700 Subject: [PATCH 12/35] Delete the custom template. I'm not sure what it did, and whatever it did is now obsolete. @ksuess? --- docs/_templates/sections/header-article.html | 35 -------------------- 1 file changed, 35 deletions(-) delete mode 100644 docs/_templates/sections/header-article.html diff --git a/docs/_templates/sections/header-article.html b/docs/_templates/sections/header-article.html deleted file mode 100644 index 136ce58e5..000000000 --- a/docs/_templates/sections/header-article.html +++ /dev/null @@ -1,35 +0,0 @@ -{# To trigger whether the TOC and its button show up #} -{% set page_toc = generate_toc_html() %} -{% from "../macros/buttons.html" import render_funcs, render_label_input_button with context %} - -
-
- {% if theme_single_page != True %} - {{ render_label_input_button(for_input="__navigation", tooltip="Toggle navigation", icon="fas fa-bars", tooltip_placement="right") }} - {% endif %} -
- -
- {%- for button in header_buttons -%} - {{ render_funcs[button.pop("type")](**button) }} - {%- endfor -%} - - {% if page_toc -%} - {{ render_label_input_button("__page-toc", icon="fas fa-list", label="page-toc") }} - {%- endif %} -
-
- - -
- {%- if page_toc | length >= 1 %} -
- {{ translate(theme_toc_title) }} -
- - {%- endif %} -
From 235bd50ccd439e44de85c2b5c6f062fb9de58379 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 2 Apr 2023 03:53:36 -0700 Subject: [PATCH 13/35] Update requirements.txt and constraints.txt --- constraints.txt | 1 - requirements.txt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/constraints.txt b/constraints.txt index d4fa72ad2..e69de29bb 100644 --- a/constraints.txt +++ b/constraints.txt @@ -1 +0,0 @@ -Sphinx<5,>=4.1.2 # sphinx-book-theme 0.3.3 has requirement sphinx<5,>=3, and merged with previous pin diff --git a/requirements.txt b/requirements.txt index c70fa4175..3b5e757cb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ lesscpy linkify-it-py myst-parser sphinx-autobuild -sphinx-book-theme<=0.3.99 +sphinx-book-theme sphinx-copybutton sphinx-design sphinx-sitemap From 86e699d94dc78ed8b4a41ab376f44d1eb31222ea Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 9 Apr 2023 16:14:01 -0700 Subject: [PATCH 14/35] Add HTML meta tags --- docs/angular/index.md | 8 ++++++-- docs/deployment/index.md | 8 ++++++-- docs/gatsby/index.md | 10 +++++++--- docs/solr/index.md | 10 +++++++--- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/docs/angular/index.md b/docs/angular/index.md index 576abaa1e..f4f04a042 100644 --- a/docs/angular/index.md +++ b/docs/angular/index.md @@ -1,6 +1,10 @@ --- -html_meta: - description: Building Angular 4 apps using the Plone REST API. +myst: + html_meta: + "description": "How to build Angular 4 applications using the Plone REST API" + "property=og:description": "How to build Angular 4 applications using the Plone REST API" + "property=og:title": "How to build Angular 4 applications using the Plone REST API" + "keywords": "Plone, REST, API, Angular, training" --- (angular-label)= diff --git a/docs/deployment/index.md b/docs/deployment/index.md index 0fccc1603..90c44e5eb 100644 --- a/docs/deployment/index.md +++ b/docs/deployment/index.md @@ -1,6 +1,10 @@ --- -html_meta: - description: Deploying Plone with Ansible and OpsWorks +myst: + html_meta: + "description": "Deploying Plone with Ansible and OpsWorks" + "property=og:description": "Deploying Plone with Ansible and OpsWorks" + "property=og:title": "Deploying Plone with Ansible and OpsWorks" + "keywords": "Plone, deploy, WSGI, training" --- (automating-deployment-label)= diff --git a/docs/gatsby/index.md b/docs/gatsby/index.md index 08eff9060..95dfc038b 100644 --- a/docs/gatsby/index.md +++ b/docs/gatsby/index.md @@ -1,9 +1,13 @@ --- -html_meta: - description: Building blazing-fast static websites with GatsbyJS +myst: + html_meta: + "description": "Building blazing-fast static websites with GatsbyJS" + "property=og:description": "Building blazing-fast static websites with GatsbyJS" + "property=og:title": "Building blazing-fast static websites with GatsbyJS" + "keywords": "Plone, static, websites, GatsbyJS, training" --- -% gatsby-label: +(gatsby-label)= # GatsbyJS diff --git a/docs/solr/index.md b/docs/solr/index.md index 5cc7081d1..4c3ce5bdb 100644 --- a/docs/solr/index.md +++ b/docs/solr/index.md @@ -1,9 +1,13 @@ --- -html_meta: - description: Integrate Plone with Solr +myst: + html_meta: + "description": "Integrate Plone with Solr" + "property=og:description": "Integrate Plone with Solr" + "property=og:title": "Integrate Plone with Solr" + "keywords": "Plone, Integrate, Solr, training" --- -# Plone Training Solr +# Integrate Plone with Solr About : Integrate Plone with Solr From ea436ee7aef2af7db4d00e208f513a2f0f272c81 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 9 Apr 2023 16:53:54 -0700 Subject: [PATCH 15/35] Fix local and intersphinx cross references --- docs/angular/sdk.md | 2 +- docs/angular/using.md | 2 +- .../architecture/bootstrap-volto.md | 2 +- .../architecture/client-ssr.md | 3 +-- .../writing-serializer-deserializer.md | 20 +++++++------------ docs/effective-volto/deployment/simple.md | 2 +- docs/gatsby/buildingsourceplugins.md | 4 ++-- docs/gatsby/plonerestapi.md | 4 ++-- docs/javascript/index.md | 2 +- docs/mastering-plone-5/plone5.md | 2 +- docs/mastering-plone-5/restapi.md | 2 +- docs/mastering-plone/api.md | 8 ++++---- docs/mastering-plone/plone_versions.md | 2 +- docs/mastering-plone/restapi.md | 2 +- .../volto_components_sponsors.md | 4 ++-- docs/mastering-plone/what_is_plone.md | 6 +++--- 16 files changed, 30 insertions(+), 37 deletions(-) diff --git a/docs/angular/sdk.md b/docs/angular/sdk.md index 1a7a0e5db..ef02d44ce 100644 --- a/docs/angular/sdk.md +++ b/docs/angular/sdk.md @@ -12,7 +12,7 @@ myst: The [Plone Angular SDK](https://www.npmjs.com/package/@plone/restapi-angular) is an Angular package (named `@plone/restapi-angular` as it belongs to the Plone NPM organization). -It is a high-level integration layer between Angular and the [Plone REST API](plone6docs:plone.restapi/docs/source/index). +It is a high-level integration layer between Angular and the {doc}`Plone REST API `. It provides: diff --git a/docs/angular/using.md b/docs/angular/using.md index ae196b70d..18a493448 100644 --- a/docs/angular/using.md +++ b/docs/angular/using.md @@ -11,7 +11,7 @@ myst: ## Preparing The Plone Backend -We need a Plone server running the latest version of [Plone REST API](plone6docs:plone.restapi/docs/source/index). +We need a Plone server running the latest version of {doc}`Plone REST API `. We will use a [Plone pre-configured Heroku instance](https://github.com/collective/training-sandbox). diff --git a/docs/effective-volto/architecture/bootstrap-volto.md b/docs/effective-volto/architecture/bootstrap-volto.md index 1fbd9382a..b8028493f 100644 --- a/docs/effective-volto/architecture/bootstrap-volto.md +++ b/docs/effective-volto/architecture/bootstrap-volto.md @@ -150,7 +150,7 @@ execute `docker run` will be use to persist the backend server data. ``` If you are somewhat familiar with Python development, you can also install Plone locally -without using Docker. Check the [backend configuration](../configuration/backend.md) section. +without using Docker. Check the {doc}`../getting-started` section. It also has more information on plone.volto. diff --git a/docs/effective-volto/architecture/client-ssr.md b/docs/effective-volto/architecture/client-ssr.md index 285a2ea45..5189d8f51 100644 --- a/docs/effective-volto/architecture/client-ssr.md +++ b/docs/effective-volto/architecture/client-ssr.md @@ -45,5 +45,4 @@ communication protocol, all the available endpoints, etc. are provided by the Sometimes view components have code that fetches content via async network calls. In case that content should be rendered together with the rest of -the generated HTML, you need to follow the -[AsyncConnect](../addons/asyncconect) chapter. +the generated HTML, you need to follow the {doc}`../addons/asyncconect` chapter. diff --git a/docs/effective-volto/backend/writing-serializer-deserializer.md b/docs/effective-volto/backend/writing-serializer-deserializer.md index 870817188..91620f751 100644 --- a/docs/effective-volto/backend/writing-serializer-deserializer.md +++ b/docs/effective-volto/backend/writing-serializer-deserializer.md @@ -17,22 +17,16 @@ example) and convert it to live Python objects. The (de)serializers, with the type-based lookups are a great example of ZCML use, as they're all implemented as adapters for the content+request => ISomeSerializationInferface. -1. content based, where the class of the context item is used as discriminator - in the adaptor to `plone.restapi.interfaces.ISerializeToJson` (and the - counterpart `IDeserializeToJson`. See the [DX Content serializer][1] -2. field based, used when processing DX Content, where each field/property is - adapted for endpoint serialization with the `IFieldSerializer` - / `IFieldDeserializer`. See the [DX Field serializers][2] -3. block based, where we take the JSON data bits that represent a Volto block - data and transform it (see the [writing block transformers](./writing-block-transformers) page). -4. value based, where each Python basic data value needs to be transformed into - a JSON-compatible representation, with the `IJsonCompatible` adaptor (use - `json_compatible()` helper for this. See the [converters.py module][3] with - these basic serializers. +1. content based, where the class of the context item is used as discriminator in the adaptor to `plone.restapi.interfaces.ISerializeToJson` (and the counterpart `IDeserializeToJson`. + See the [DX Content serializer][1]. +2. field based, used when processing DX Content, where each field/property is adapted for endpoint serialization with the `IFieldSerializer` / `IFieldDeserializer`. + See the [DX Field serializers][2]. +3. block based, where we take the JSON data bits that represent a Volto block data and transform it (see the {doc}`writing-block-transforms` chapter). +4. value based, where each Python basic data value needs to be transformed into a JSON-compatible representation, with the `IJsonCompatible` adaptor (use `json_compatible()` helper for this. + See the [converters.py module][3] with these basic serializers. Here's how the Folder serializer looks like: - ```python @implementer(ISerializeToJson) @adapter(IDexterityContainer, Interface) diff --git a/docs/effective-volto/deployment/simple.md b/docs/effective-volto/deployment/simple.md index cfe2790b2..619374d3a 100644 --- a/docs/effective-volto/deployment/simple.md +++ b/docs/effective-volto/deployment/simple.md @@ -111,4 +111,4 @@ server { If you're getting [CORS errors](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors#identifying_the_issue) you need to understand the nature of these errors: the backend server (usually Plone) needs to be configured to "know" the final domain where the content is fetched. This is done for security purposes, to protect the information in the backend server from being loaded by client browsers on unknown domains. So make sure that the backend server is properly configured for your purposes. When using Plone with Docker, check the [CORS](https://github.com/plone/plone.docker#for-basic-usage) documentation section, otherwise the [CORS section of plone.rest](https://github.com/plone/plone.rest#cors). -For more information {ref}`CORS`. +For more information {doc}`../architecture/CORS`. diff --git a/docs/gatsby/buildingsourceplugins.md b/docs/gatsby/buildingsourceplugins.md index a380f31ab..6190be7bd 100644 --- a/docs/gatsby/buildingsourceplugins.md +++ b/docs/gatsby/buildingsourceplugins.md @@ -19,7 +19,7 @@ This requires the Plone site to have [plone.restapi](https://pypi.org/project/pl ```{note} plone.restapi is a RESTful hypermedia API for Plone. -Read more about it in the [docs](plone6docs:plone.restapi/docs/source/index). +Read more about it in the documentation of {doc}`Plone REST API `. ``` Then this plugin can be used to generate a static site from a Plone site, containing pages, structure and all of its contents. @@ -38,7 +38,7 @@ This way there is a page structure as well. ```{note} Plone even allows custom types. -Read more about this in the [docs](plone6docs:plone.restapi/docs/source/endpoints/content-types). +Read more about this in {doc}`plone6docs:plone.restapi/docs/source/endpoints/content-types`). ``` Each of these content objects can be compared to nodes in GatsbyJS. diff --git a/docs/gatsby/plonerestapi.md b/docs/gatsby/plonerestapi.md index 4944f4ac6..f618acd98 100644 --- a/docs/gatsby/plonerestapi.md +++ b/docs/gatsby/plonerestapi.md @@ -11,12 +11,12 @@ myst: Now that we have an idea of how to create nodes, we can move on to retrieving data from a Plone site and creating nodes with that data. -All the data from a Plone site is available in the JSON format using the [plone.restapi](plone6docs:plone.restapi/docs/source/index). +All the data from a Plone site is available in the JSON format using {doc}`plone6docs:plone.restapi/docs/source/index`. We will be working a lot with this API while working on the Gatsby source-plugin. It is recommended that you have an API browser to explore the API. -Install [Postman](https://www.postman.com/), then go through the quick guide to working with [plone.restapi](plone6docs:plone.restapi/docs/source/usage/exploring). +Install [Postman](https://www.postman.com/), then go through the quick guide to working with {doc}`plone6docs:plone.restapi/docs/source/usage/exploring`. ```{note} We will use the same endpoints for loading the site in a browser, but set the header `Accept: application/json`. diff --git a/docs/javascript/index.md b/docs/javascript/index.md index 9fa48b73e..bfd71c50a 100644 --- a/docs/javascript/index.md +++ b/docs/javascript/index.md @@ -14,7 +14,7 @@ myst: ```{note} This training is for Plone 5 only. A rewritten training for JavaScript in Plone 6 Classic UI will follow later on. -In the meantime [Plone 6 documentation](plone6docs:classic-ui/static-resources) is your primary source of information for JavaScript in Plone 6 Classic UI. +In the meantime {doc}`plone6docs:classic-ui/static-resources` is your primary source of information for JavaScript in Plone 6 Classic UI. ``` About diff --git a/docs/mastering-plone-5/plone5.md b/docs/mastering-plone-5/plone5.md index 14eb2e0da..88c849ea6 100644 --- a/docs/mastering-plone-5/plone5.md +++ b/docs/mastering-plone-5/plone5.md @@ -190,7 +190,7 @@ Plone 5.2 supports Python 2.7, 3.6 and 3.7. It is based on Zope 4.0 and runs WSG Plone 5.2 comes with many bug fixes and a couple of nice improvements. Here are some noteworthy changes: - New navigation with dropdown. Site-Administrators can use the navigation control panel `/@@navigation-controlpanel` to configure the dropdown-navigation. -- Plone 5.2 ships with [plone.restapi](plone6docs:plone.restapi/docs/source/index) +- Plone 5.2 ships with {doc}`plone6docs:plone.restapi/docs/source/index`. - New Login. The old skin-templates and skin-scripts were replaced by browser-views that are much easier to customize. - Merge Products.RedirectionTool into core. Site-Administrators can use the {guilabel}`URL Management` control panel (`/@@redirection-controlpanel`) to manage and add alternative URLs including bulk upload of alternative urls. As an Editor, you can see the {guilabel}`URL Management` link in the {guilabel}`actions` menu of a content item, and add or remove alternative URLs for this specific content item. diff --git a/docs/mastering-plone-5/restapi.md b/docs/mastering-plone-5/restapi.md index 660b0a8f3..247199d88 100644 --- a/docs/mastering-plone-5/restapi.md +++ b/docs/mastering-plone-5/restapi.md @@ -17,7 +17,7 @@ git checkout restapi ``` ```` -In this chapter, we will have a look at the [plone.restapi](plone6docs:plone.restapi/docs/source/index), which is a core package as of Plone 5.2. +In this chapter, we will have a look at the {doc}`plone6docs:plone.restapi/docs/source/index`, which is a core package as of Plone 5.2. It provides a hypermedia API to access Plone content using REST (Representational State Transfer). diff --git a/docs/mastering-plone/api.md b/docs/mastering-plone/api.md index edd135b23..03342b2da 100644 --- a/docs/mastering-plone/api.md +++ b/docs/mastering-plone/api.md @@ -40,7 +40,7 @@ Topics covered: ## plone.api -The most important tool nowadays for plone developers is the add-on [plone.api](plone6docs:plone.api/content) that covers 20% of the tasks any Plone developer does 80% of the time. If you are not sure how to handle a certain task, be sure to first check if `plone.api` has a solution for you. +The most important tool nowadays for plone developers is the add-on {doc}`plone6docs:plone.api/index` that covers 20% of the tasks any Plone developer does 80% of the time. If you are not sure how to handle a certain task, be sure to first check if `plone.api` has a solution for you. The API is divided in five sections. Here is one example from each: @@ -194,14 +194,14 @@ It aggregates tracebacks from many sources and (here comes the killer feature) e - Create a new BrowserView callable as `/@@demo_content` in a new file {file}`demo.py`. - The view should create five talks each time it is called. -- Use the docs at [plone.api/content](plone6docs:plone.api/content) to find out how to create new talks. +- Use the docs at {doc}`plone6docs:plone.api/content` to find out how to create new talks. - Use `plone.api.content.transition` to publish all new talks. Find the docs for that method. - Only managers should be able to use the view (the permission is called `cmf.ManagePortal`). - Switch to the frontpage after calling the view. -- Display a message about the results (see [Show notification message](plone6docs:plone.api/portal)). +- Display a message about the results (see {ref}`plone6docs:portal-show-message-example`). - For extra credits use the library [requests](https://requests.readthedocs.io/en/latest/) and [Wikipedia](https://www.mediawiki.org/wiki/Wikimedia_REST_API) to populate the talks with content. - Use the utility methods `cropText` from `Producs.CMFPlone` to crop the title after 20 characters. - Use the docs at [Global utils and helpers](plone6docs:backend/global-utils) to find an overview of `plone_view` helpers. + Use the docs at {doc}`plone6docs:backend/global-utils` to find an overview of `plone_view` helpers. ```{note} - Do not try everything at once, work in small iterations, restart to check your results frequently. diff --git a/docs/mastering-plone/plone_versions.md b/docs/mastering-plone/plone_versions.md index 72da6a6d4..62fc67c0c 100644 --- a/docs/mastering-plone/plone_versions.md +++ b/docs/mastering-plone/plone_versions.md @@ -137,7 +137,7 @@ Here are some noteworthy changes: - New navigation with dropdown. Site-Administrators can use the navigation control panel `/@@navigation-controlpanel` to configure the dropdown-navigation. -- Plone 5.2 ships with [plone.restapi](plone6docs:plone.restapi/docs/source/index). +- Plone 5.2 ships with {doc}`plone6docs:plone.restapi/docs/source/index`. - New Login. The old skin templates and skin scripts were replaced by browser views that are much easier to customize. - Merge `Products.RedirectionTool` into core. diff --git a/docs/mastering-plone/restapi.md b/docs/mastering-plone/restapi.md index a039bffa6..d48d4daf6 100644 --- a/docs/mastering-plone/restapi.md +++ b/docs/mastering-plone/restapi.md @@ -22,7 +22,7 @@ git checkout restapi ``` ```` -In this chapter, we will use [plone.restapi](plone6docs:plone.restapi/docs/source/index), to iteract with the backend without using Volto. +In this chapter, we will use {doc}`plone6docs:plone.restapi/docs/source/index`, to iteract with the backend without using Volto. It provides a hypermedia API to access Plone content using REST (Representational State Transfer). diff --git a/docs/mastering-plone/volto_components_sponsors.md b/docs/mastering-plone/volto_components_sponsors.md index 6bbb86d77..2a50af899 100644 --- a/docs/mastering-plone/volto_components_sponsors.md +++ b/docs/mastering-plone/volto_components_sponsors.md @@ -3,7 +3,7 @@ myst: html_meta: "description": "How to fetch data from the backend" "property=og:description": "How to fetch data from the backend" - "property=og:title": "" + "property=og:title": "The Sponsors Component, how to fetch data from the backend" "keywords": "REST API, Semantic UI" --- @@ -227,7 +227,7 @@ React.useEffect(() => { ``` ```{seealso} -[Plone REST API Search](plone6docs:plone.restapi/docs/source/endpoints/searching) +{doc}`plone6docs:plone.restapi/docs/source/endpoints/searching` ``` diff --git a/docs/mastering-plone/what_is_plone.md b/docs/mastering-plone/what_is_plone.md index 3ab3c58fd..7e12d63d3 100644 --- a/docs/mastering-plone/what_is_plone.md +++ b/docs/mastering-plone/what_is_plone.md @@ -17,7 +17,7 @@ Plone is an open source Content Management System (CMS) built in Python. A CMS l - Written in `Python` - `Plone` 5.2 supports `Python` 3 and 2 - `Plone` 6 supports `Python` 3 -- [Plone REST API](plone6docs:plone.restapi/docs/source/index) +- {doc}`plone6docs:plone.restapi/docs/source/index` - `Volto`: `React` based frontend and editor - Based on the web framework {term}`Zope` - Database: `Zope Object Database` {term}`ZODB` or `ORM` & `SQL`/`Postgres`/`Oracle` @@ -283,7 +283,7 @@ This is what we are extending and using during this training. ### Rest API -[Plone REST API](plone6docs:plone.restapi/docs/source/index) +{doc}`plone6docs:plone.restapi/docs/source/index` is a hypermedia API to access Plone content using REST (Representational State Transfer). It is used to connect the Volto frontend with Plone. @@ -300,7 +300,7 @@ Here are some basics that you need to understand if you are new to Volto: - All data is stored in Plone backend. The Volto frontend comes in to display and edit the content. - Volto is built in [ReactJS](https://reactjs.org), a modern Javascript Framework. -- Volto uses [plone.restapi](plone6docs:plone.restapi/docs/source/index) to communicate with the Plone backend. +- Volto uses {doc}`plone6docs:plone.restapi/docs/source/index` to communicate with the Plone backend. - Volto is installed separately from the Plone backend. See chapter {ref}`instructions-install-frontend-label` for instructions. - Volto runs in a different process than the Plone backend. From 324067f53cf6d239b22bb0cb16b0cef75952df3d Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 9 Apr 2023 17:12:46 -0700 Subject: [PATCH 16/35] Fix broken links and references --- docs/contributing/writing-docs-guide.md | 2 +- .../getting-started/roadmap.md | 2 +- docs/gatsby/buildingsourceplugins.md | 2 +- docs/gatsby/data.md | 2 +- docs/gatsby/gatsbysourceplone.md | 6 ++-- docs/gatsby/gatsbystarterplone.md | 2 +- docs/gatsby/pages.md | 2 +- docs/gatsby/plonerestapi.md | 24 +++++++------- docs/gatsby/searchtraversal.md | 32 +++++++++---------- docs/glossary.md | 2 +- docs/javascript/exercises/13.md | 2 +- docs/mastering-plone-5/about_mastering.md | 2 +- docs/mastering-plone/about_mastering.md | 2 +- docs/mastering-plone/volto_talkview.md | 4 +-- docs/plone-deployment/edit-project.md | 2 +- docs/react/intro.md | 2 +- docs/solr/solr-gui.md | 2 +- docs/volto/intro.md | 2 +- docs/voltoaddons/01-addon-basics.md | 2 +- docs/voltoaddons/03-block-view.md | 8 ++--- .../voltoaddons/05-objectwidget-block-edit.md | 2 +- docs/voltoaddons/intro.md | 2 +- docs/voltohandson/header.md | 2 +- docs/voltohandson/intro.md | 2 +- 24 files changed, 54 insertions(+), 58 deletions(-) diff --git a/docs/contributing/writing-docs-guide.md b/docs/contributing/writing-docs-guide.md index 086339581..6fb0982f2 100644 --- a/docs/contributing/writing-docs-guide.md +++ b/docs/contributing/writing-docs-guide.md @@ -221,7 +221,7 @@ Add a term to the {ref}`glossary-label`, located at {file}`/glossary.md`. ```md React - [React](https://reactjs.org/) is a JavaScript library for building user interfaces. + [React](https://react.dev/) is a JavaScript library for building user interfaces. Volto, the frontend for Plone 6, uses React. ``` diff --git a/docs/effective-volto/getting-started/roadmap.md b/docs/effective-volto/getting-started/roadmap.md index 225524fbd..a0779f93f 100644 --- a/docs/effective-volto/getting-started/roadmap.md +++ b/docs/effective-volto/getting-started/roadmap.md @@ -28,7 +28,7 @@ As is the case with similar modern JavaScript-based applications, you should kno - Modern JavaScript development. Volto uses next-generation JavaScript. Follow the [ES6 guide](https://flaviocopes.com/es6/) to get up to speed. - React knowledge - [basic level is - fine](https://reactjs.org/tutorial/tutorial.html) for the beginning, you'll progress + fine](https://react.dev/learn/tutorial-tic-tac-toe) for the beginning, you'll progress along the way. React itself is a simple and well documented framework. - A basic understanding of JavaScript [CommonJS](https://flaviocopes.com/commonjs/), diff --git a/docs/gatsby/buildingsourceplugins.md b/docs/gatsby/buildingsourceplugins.md index 6190be7bd..cbb64221c 100644 --- a/docs/gatsby/buildingsourceplugins.md +++ b/docs/gatsby/buildingsourceplugins.md @@ -89,7 +89,7 @@ plugins: [ { resolve: 'gatsby-source-plone', options: { - baseUrl: 'https://6.demo.plone.org', + baseUrl: 'https://demo.plone.org', }, } ] diff --git a/docs/gatsby/data.md b/docs/gatsby/data.md index 871852cfb..e90e6aaa6 100644 --- a/docs/gatsby/data.md +++ b/docs/gatsby/data.md @@ -176,7 +176,7 @@ const Layout = ({ children }) => ( In this case, the query is an attribute of the `` tag. ```{note} -StaticQuery is different from standard components that we have seen before, because it uses a ReactJS pattern called [render props](https://reactjs.org/docs/render-props.html). +StaticQuery is different from standard components that we have seen before, because it uses a ReactJS pattern called [render props](https://legacy.reactjs.org/docs/render-props.html). This pattern is used when there are different components of the interface that need the same piece of code/logic and we do not want to duplicate the same code. diff --git a/docs/gatsby/gatsbysourceplone.md b/docs/gatsby/gatsbysourceplone.md index 6024a0005..b49c23ea8 100644 --- a/docs/gatsby/gatsbysourceplone.md +++ b/docs/gatsby/gatsbysourceplone.md @@ -28,7 +28,7 @@ All of the settings for the `gatsby-source-plone` plugin is in the `gatsby-node. { resolve: 'gatsby-source-plone', options: { - baseUrl: 'https://6.demo.plone.org' + baseUrl: 'https://demo.plone.org' }, }, ``` @@ -46,12 +46,12 @@ This is used in some Plone sites that require authentication to query data. For configuring authentication with `JWT` and [dotenv](https://github.com/motdotla/dotenv), read the full [documentation](https://collective.github.io/gatsby-source-plone/reference/authentication/) for a step by step reference. ```{note} - which was earlier used in the examples requires authentication to query for data. + which was earlier used in the examples requires authentication to query for data. ``` ```{warning} This tutorial previously used `https://plonedemo.kitconcept.com/en` in its examples because it did not require authorization. -The Plone Foundation now actively maintains a [Plone 6 demo](https://6.demo.plone.org). +The Plone Foundation now actively maintains a [Plone 6 demo](https://demo.plone.org). Browsing its API requires a basic authorization token. We have updated all references to use the Plone 6 demo. All that means the examples might not work. diff --git a/docs/gatsby/gatsbystarterplone.md b/docs/gatsby/gatsbystarterplone.md index 50e2a51e1..0c8a229ab 100644 --- a/docs/gatsby/gatsbystarterplone.md +++ b/docs/gatsby/gatsbystarterplone.md @@ -32,6 +32,6 @@ gatsby develop Yes! We have a GatsbyJS site sourced from a Plone site up and running. -Take time exploring the static site generated by GatsbyJS and compare it to the Plone site at . +Take time exploring the static site generated by GatsbyJS and compare it to the Plone site at . Notice that we have tried to keep them as similar as possible. diff --git a/docs/gatsby/pages.md b/docs/gatsby/pages.md index 672793abb..6bc3e6371 100644 --- a/docs/gatsby/pages.md +++ b/docs/gatsby/pages.md @@ -45,7 +45,7 @@ You can see that React components are written in a particular syntax called `JSX Components are functions (or ES6 classes) that accept some data and renders some HTML. ```{note} -You can see more information in the official [ReactJS documentation](https://reactjs.org/docs/components-and-props.html) +You can see more information in the official [ReactJS documentation](https://legacy.reactjs.org/docs/components-and-props.html). ``` ## Exercise diff --git a/docs/gatsby/plonerestapi.md b/docs/gatsby/plonerestapi.md index f618acd98..dd6a45f11 100644 --- a/docs/gatsby/plonerestapi.md +++ b/docs/gatsby/plonerestapi.md @@ -25,26 +25,26 @@ This header tells the endpoint to return JSON data in the response for us to pro ## Exploring The Plone REST.API -We will use as our source Plone site, since it's already been configured with the `plone.restapi` and is all ready for our usage. +We will use as our source Plone site, since it's already been configured with the `plone.restapi` and is all ready for our usage. Let us start with the root itself. -Send a GET request to . +Send a GET request to . This returns the JSON data for the root of the Plone site. ```json { "@components": { "breadcrumbs": { - "@id": "https://6.demo.plone.org/@breadcrumbs" + "@id": "https://demo.plone.org/@breadcrumbs" }, "navigation": { - "@id": "https://6.demo.plone.org/@navigation" + "@id": "https://demo.plone.org/@navigation" }, "workflow": { - "@id": "https://6.demo.plone.org/@workflow" + "@id": "https://demo.plone.org/@workflow" } }, - "@id": "https://6.demo.plone.org", + "@id": "https://demo.plone.org", "@type": "LRF", "UID": "7306e5d778be477f8b40bccaad1ecae7", "contributors": [], @@ -60,21 +60,21 @@ This returns the JSON data for the root of the Plone site. "is_folderish": true, "items": [ { - "@id": "https://6.demo.plone.org/media", + "@id": "https://demo.plone.org/media", "@type": "LIF", "description": "", "review_state": "published", "title": "Media" }, { - "@id": "https://6.demo.plone.org/frontpage", + "@id": "https://demo.plone.org/frontpage", "@type": "Document", "description": "The ultimate Open Source Enterprise CMS", "review_state": "published", "title": "Welcome to Plone 5" }, { - "@id": "https://6.demo.plone.org/demo", + "@id": "https://demo.plone.org/demo", "@type": "Folder", "description": "Vestibulum dignissim erat id eros mollis vitae tempus leo ultricies. Cras dapibus suscipit consectetur. Integer tincidunt feugiat tristique. Sed et arcu risus. Nam venenatis, tortor ac tincidunt amet.", "review_state": "published", @@ -99,13 +99,13 @@ This returns the JSON data for the root of the Plone site. } ``` -Let us explore the `items` array from the response and click on `https://6.demo.plone.org/frontpage`. +Let us explore the `items` array from the response and click on `https://demo.plone.org/frontpage`. We see that it gives a similar response as we got for the root. This way all the content objects have equivalent JSON data which our plugin can process and use to create nodes. ### Exercise -Create a node for the Plone document at `https://6.demo.plone.org/demo/a-page`. +Create a node for the Plone document at `https://demo.plone.org/demo/a-page`. Test the node created from the retrieved data by displaying some data in the `index` or any other page. Hints: Use Postman to check the data from the endpoint. @@ -128,7 +128,7 @@ Read more about GET requests with Axios in the [official docs](https://www.npmjs exports.sourceNodes = async ({ actions }) => { const { createNode } = actions; - const { data } = await axios.get('https://6.demo.plone.org/demo/a-page', { + const { data } = await axios.get('https://demo.plone.org/demo/a-page', { headers: { accept: "application/json", } diff --git a/docs/gatsby/searchtraversal.md b/docs/gatsby/searchtraversal.md index ed591681d..fa71c99fe 100644 --- a/docs/gatsby/searchtraversal.md +++ b/docs/gatsby/searchtraversal.md @@ -16,28 +16,28 @@ One of the strategies that we experimented with and adopted for the source-plugi ## Getting The Full List Of Content -Make a GET request to `https://6.demo.plone.org/@search`. +Make a GET request to `https://demo.plone.org/@search`. ```json { - "@id": "https://6.demo.plone.org/@search", + "@id": "https://demo.plone.org/@search", "items": [ { - "@id": "https://6.demo.plone.org", + "@id": "https://demo.plone.org", "@type": "LRF", "description": "", "review_state": "published", "title": "English" }, { - "@id": "https://6.demo.plone.org/media", + "@id": "https://demo.plone.org/media", "@type": "LIF", "description": "", "review_state": "published", "title": "Media" }, { - "@id": "https://6.demo.plone.org/frontpage", + "@id": "https://demo.plone.org/frontpage", "@type": "Document", "description": "The ultimate Open Source Enterprise CMS", "review_state": "published", @@ -53,22 +53,22 @@ There is limited information here. To build a node we need more data. We could try calling the `@id` endpoint and see what it returns. -Send a GET request to the `id` of one of these objects, say `https://6.demo.plone.org/frontpage`. +Send a GET request to the `id` of one of these objects, say `https://demo.plone.org/frontpage`. ```json { "@components": { "breadcrumbs": { - "@id": "https://6.demo.plone.org/frontpage/@breadcrumbs" + "@id": "https://demo.plone.org/frontpage/@breadcrumbs" }, "navigation": { - "@id": "https://6.demo.plone.org/frontpage/@navigation" + "@id": "https://demo.plone.org/frontpage/@navigation" }, "workflow": { - "@id": "https://6.demo.plone.org/frontpage/@workflow" + "@id": "https://demo.plone.org/frontpage/@workflow" } }, - "@id": "https://6.demo.plone.org/frontpage", + "@id": "https://demo.plone.org/frontpage", "@type": "Document", "UID": "5938b3c2c0e147b18fbf20d32842eb06", "allow_discussion": null, @@ -88,7 +88,7 @@ Send a GET request to the `id` of one of these objects, say `https://6.demo.plon "layout": "document_view", "modified": "2018-10-13T13:25:31+00:00", "parent": { - "@id": "https://6.demo.plone.org", + "@id": "https://demo.plone.org", "@type": "LRF", "description": "", "review_state": "published", @@ -145,7 +145,7 @@ const fetchData = async url => { exports.sourceNodes = async ({ actions }) => { const { createNode } = actions; - const baseUrl = 'https://6.demo.plone.org'; + const baseUrl = 'https://demo.plone.org'; console.log('Fetching items list'); const data = await fetchData(baseUrl + '/@search'); @@ -194,12 +194,12 @@ We prepend `Plone` to the type and remove spaces for it to automatically handle ``` ```{note} -We use the here directly for development purposes but in a real-world case, use the `baseUrl` passed in from plugin options in `gatsby-config.js`. +We use the here directly for development purposes but in a real-world case, use the `baseUrl` passed in from plugin options in `gatsby-config.js`. ``` ```{warning} This tutorial previously used `https://plonedemo.kitconcept.com/en` in its examples because it did not require authorization. -The Plone Foundation now actively maintains a [Plone 6 demo](https://6.demo.plone.org). +The Plone Foundation now actively maintains a [Plone 6 demo](https://demo.plone.org). Browsing its API requires a basic authorization token. We have updated all references to use the Plone 6 demo. All that means the examples might not work. @@ -217,7 +217,7 @@ Now that you have the search traversal method implemented, all the data form the Run the development server with `gatsby develop` and navigate to GraphiQL explorer at . -Try to get data for a particular page with id `https://6.demo.plone.org/demo/a-news-item`. +Try to get data for a particular page with id `https://demo.plone.org/demo/a-news-item`. ````{admonition} Solution :class: toggle @@ -226,7 +226,7 @@ Since it is a News Item, we can directly use GraphQL to query for `ploneNewsItem ```text { - ploneNewsItem (id: {eq: "https://6.demo.plone.org/demo/a-news-item"}) { + ploneNewsItem (id: {eq: "https://demo.plone.org/demo/a-news-item"}) { id title description diff --git a/docs/glossary.md b/docs/glossary.md index 6d11901cc..ca3dac2d7 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -218,7 +218,7 @@ hoisting (Yarn) In case two dependencies have conflicting version dependencies of the same library, the hoisting will not be possible (for that conflicting dependency) and you'll see multiple instances of the same library in the bundle, or you'll see that the add-on receives its own `node_modules` folder. React - [React](https://reactjs.org/) is a JavaScript library for building user interfaces. + [React](https://react.dev/) is a JavaScript library for building user interfaces. Volto, the frontend for Plone 6, uses React. Sphinx diff --git a/docs/javascript/exercises/13.md b/docs/javascript/exercises/13.md index 56bac9cc2..046daa019 100644 --- a/docs/javascript/exercises/13.md +++ b/docs/javascript/exercises/13.md @@ -13,7 +13,7 @@ myst: This exercise requires a working buildout using a fork of the `collective.jstraining` package. ``` -In this exercise, we will be walking through creating a pattern that uses [ReactJS](https://reactjs.org/). +In this exercise, we will be walking through creating a pattern that uses [ReactJS](https://react.dev/). You will be working in the `exercise13` directory of the `collective.jstraining` package. diff --git a/docs/mastering-plone-5/about_mastering.md b/docs/mastering-plone-5/about_mastering.md index 6bb7512f3..b811cd15e 100644 --- a/docs/mastering-plone-5/about_mastering.md +++ b/docs/mastering-plone-5/about_mastering.md @@ -36,7 +36,7 @@ The Mastering Plone Training was so far held publicly at the following occasions - [Plone Conference 2020 Online](https://2020.ploneconf.org/) - [Plone Conference 2019 in Ferrara](https://2019.ploneconf.org/) - [Plone Conference 2018 in Tokyo](https://2018.ploneconf.org/) -- [August 2018, Munich](https://plone.org/events/community/mastering-plone-training-in-munich) +- [August 2018, Munich](https://plone.org/news-and-events/events/community/mastering-plone-training-in-munich) - [Plone Conference 2017 in Barcelona](https://2017.ploneconf.org/) - [Plone Conference 2016 in Boston](https://2016.ploneconf.org/) - [Plone Conference 2015, Bucharest](https://2015.ploneconf.org/) diff --git a/docs/mastering-plone/about_mastering.md b/docs/mastering-plone/about_mastering.md index dbf121441..14fb84149 100644 --- a/docs/mastering-plone/about_mastering.md +++ b/docs/mastering-plone/about_mastering.md @@ -44,7 +44,7 @@ The Mastering Plone Training was so far held publicly at the following occasions - [Plone Conference ONLINE 2020](https://2020.ploneconf.org/) - [Plone Conference 2019 in Ferrara](https://2019.ploneconf.org/) - [Plone Conference 2018 in Tokyo](https://2018.ploneconf.org/) -- [August 2018, Munich](https://plone.org/events/community/mastering-plone-training-in-munich) +- [August 2018, Munich](https://plone.org/news-and-events/events/community/mastering-plone-training-in-munich) - [Plone Conference 2017 in Barcelona](https://2017.ploneconf.org/) - [Plone Conference 2016 in Boston](https://2016.ploneconf.org/) - Plone Conference 2015, Bucharest diff --git a/docs/mastering-plone/volto_talkview.md b/docs/mastering-plone/volto_talkview.md index ac92becb7..e58a9013a 100644 --- a/docs/mastering-plone/volto_talkview.md +++ b/docs/mastering-plone/volto_talkview.md @@ -153,9 +153,9 @@ export default TalkView; }; ``` - See [Plone REST API Serialization](plone6docs:plone.restapi/docs/source/usage/serialization). + See {doc}`plone6docs:plone.restapi/docs/source/usage/serialization`. -- `content.details.data` holds the raw html. To render it properly we use `dangerouslySetInnerHTML` (see ) +- `content.details.data` holds the raw html. To render it properly we use `dangerouslySetInnerHTML` (see https://legacy.reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml). Please check the 'components' tab of Google developer tools to see the field values of your talk instance. diff --git a/docs/plone-deployment/edit-project.md b/docs/plone-deployment/edit-project.md index 8a2ebf230..8195d5c13 100644 --- a/docs/plone-deployment/edit-project.md +++ b/docs/plone-deployment/edit-project.md @@ -103,7 +103,7 @@ Always stay logged in as an Administrator in your primary web browser, and use y ### Create a GitHub OAuth application Both Plone user interfaces require the creation of a GitHub OAuth application. -Follow the GitHub documentation [Creating an OAuth App](https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app). +Follow the GitHub documentation [Creating an OAuth App](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app). You can configure the GitHub OAuth application to use only one Plone user interface at a time, but you can switch back and forth by changing the values. We will start with Classic UI configuration. diff --git a/docs/react/intro.md b/docs/react/intro.md index 9e25030d3..4c5dc9750 100644 --- a/docs/react/intro.md +++ b/docs/react/intro.md @@ -26,7 +26,7 @@ Tell us about yourselves: Some technologies and tools we use during the training: -- React https://reactjs.org/ +- React https://react.dev/ - create-react-app https://github.com/facebook/create-react-app - Yarn https://yarnpkg.com - JSX diff --git a/docs/solr/solr-gui.md b/docs/solr/solr-gui.md index 81a2d15ca..e8ad5ac5b 100644 --- a/docs/solr/solr-gui.md +++ b/docs/solr/solr-gui.md @@ -337,7 +337,7 @@ We will see an example later. ## Search GUIs > - `collective.solr` out of the box: `collective.solr` comes with its own search view. -> Since version 6.0 it has been based on [React](https://reactjs.org/) and looks similar to the Plone search view with native facet support of Solr. +> Since version 6.0 it has been based on [React](https://react.dev/) and looks similar to the Plone search view with native facet support of Solr. > - [eea.facetednavigation](https://github.com/eea/eea.facetednavigation): This add-on allows faceting out of the box even without Solr. > It is a product for integrators to setup search and filter GUIs TTW (Through-The-Web). > It can be used for several use cases: Search pages, collection replacements, etc. diff --git a/docs/volto/intro.md b/docs/volto/intro.md index c2c3679f8..94ada6a5a 100644 --- a/docs/volto/intro.md +++ b/docs/volto/intro.md @@ -26,7 +26,7 @@ Tell us about yourselves: Some technologies and tools we use during the training: -- React +- React - create-react-app - Yarn - JSX diff --git a/docs/voltoaddons/01-addon-basics.md b/docs/voltoaddons/01-addon-basics.md index 0c7102dcc..2cd43ad8b 100644 --- a/docs/voltoaddons/01-addon-basics.md +++ b/docs/voltoaddons/01-addon-basics.md @@ -339,7 +339,7 @@ speed things up. ```{note} We will be using [function -components](https://reactjs.org/docs/components-and-props.html#function-and-class-components) +components](https://legacy.reactjs.org/docs/components-and-props.html#function-and-class-components) here. There is no rule in Volto that requires choosing between class components or function components. Pick whichever feels better. Volto itself uses both styles. Although the function components are a newer API, and the use of hooks diff --git a/docs/voltoaddons/03-block-view.md b/docs/voltoaddons/03-block-view.md index 314e4096b..85765102e 100644 --- a/docs/voltoaddons/03-block-view.md +++ b/docs/voltoaddons/03-block-view.md @@ -12,7 +12,7 @@ myst: Let's add CSV file parsing. There are many CSV parsers available for NodeJS. -We'll use [Papaparse] because it also works in the browser. +We'll use [Papaparse](https://www.npmjs.com/package/papaparse) because it also works in the browser. We'll need to add the dependency to the add-on if you haven't already done so, as instructed in the first chapter. When using yarn workspaces, the @@ -99,7 +99,7 @@ export default DataTableView; ``` Writing components where the `useEffect` triggers network calls can be pretty tricky. -According to the [rule of hooks], hooks can't be triggered conditionally. +According to [Built-in React Hooks](https://legacy.reactjs.org/docs/hooks-rules.html), hooks can't be triggered conditionally. They always have to be executed. For this reason, it's important to add relevant conditions inside the hook code. Be sure to identify and prepare a way to tell, from inside the hook, if the network-fetching action should be dispatched. @@ -223,7 +223,3 @@ const DataTableView = ({ file_data }) => { export default withFileData(DataTableView); ``` - - -[papaparse]: https://www.npmjs.com/package/papaparse -[rule of hooks]: https://reactjs.org/docs/hooks-rules.html diff --git a/docs/voltoaddons/05-objectwidget-block-edit.md b/docs/voltoaddons/05-objectwidget-block-edit.md index 7eebe3773..0631878b5 100644 --- a/docs/voltoaddons/05-objectwidget-block-edit.md +++ b/docs/voltoaddons/05-objectwidget-block-edit.md @@ -115,7 +115,7 @@ const DataTableEdit = (props) => { schema.properties.columns.schema.properties.column.choices = choices; return ( - // <> represents a React Fragment see https://reactjs.org/docs/fragments.html#short-syntax for more details + // <> represents a React Fragment see https://legacy.reactjs.org/docs/fragments.html#short-syntax for more details <> ``` diff --git a/docs/voltohandson/intro.md b/docs/voltohandson/intro.md index 06e49e3d5..2e1f36840 100644 --- a/docs/voltohandson/intro.md +++ b/docs/voltohandson/intro.md @@ -26,7 +26,7 @@ Tell us about yourselves: Some technologies and tools we use during the training: -- React +- React - Yarn - JSX - Volto From a4ebc18a8c47c2eea608ef65a445b9ab72a20d05 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 9 Apr 2023 17:21:41 -0700 Subject: [PATCH 17/35] Fix more links and references --- docs/effective-volto/architecture/client-ssr.md | 2 +- docs/mastering-plone/what_is_plone.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/effective-volto/architecture/client-ssr.md b/docs/effective-volto/architecture/client-ssr.md index 5189d8f51..4eda2f1f6 100644 --- a/docs/effective-volto/architecture/client-ssr.md +++ b/docs/effective-volto/architecture/client-ssr.md @@ -45,4 +45,4 @@ communication protocol, all the available endpoints, etc. are provided by the Sometimes view components have code that fetches content via async network calls. In case that content should be rendered together with the rest of -the generated HTML, you need to follow the {doc}`../addons/asyncconect` chapter. +the generated HTML, you need to follow the {doc}`../addons/asyncconnect` chapter. diff --git a/docs/mastering-plone/what_is_plone.md b/docs/mastering-plone/what_is_plone.md index 7e12d63d3..c65c4e13a 100644 --- a/docs/mastering-plone/what_is_plone.md +++ b/docs/mastering-plone/what_is_plone.md @@ -299,7 +299,7 @@ Here are some basics that you need to understand if you are new to Volto: - All data is stored in Plone backend. The Volto frontend comes in to display and edit the content. -- Volto is built in [ReactJS](https://reactjs.org), a modern Javascript Framework. +- Volto is built in [ReactJS](https://www.reactjs.dev), a modern Javascript Framework. - Volto uses {doc}`plone6docs:plone.restapi/docs/source/index` to communicate with the Plone backend. - Volto is installed separately from the Plone backend. See chapter {ref}`instructions-install-frontend-label` for instructions. From a0dd2413e8828771592e955bca7a653df943a5b1 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 9 Apr 2023 17:31:22 -0700 Subject: [PATCH 18/35] Remove `extra_navbar` configuration as obsolete and redundant to new global navbar --- docs/conf.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 9fd1a4f02..d845d212d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -195,11 +195,6 @@ "use_repository_button": True, "use_issues_button": True, "use_edit_page_button": True, - "extra_navbar": f""" - """, } From d5cff1f3b946a509c40661e7cf82fef8423d3a9e Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 10 Apr 2023 00:36:50 -0700 Subject: [PATCH 19/35] Remove obsolete scrollspy hack --- docs/_templates/layout.html | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 45f3d6cf1..c6e98c413 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -10,8 +10,3 @@ {% endblock %} - - -{% block body_tag %} - -{%- endblock %} \ No newline at end of file From f8b9dda4463b9dddd4b0af4cb805fd5d3ba14b09 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 10 Apr 2023 00:44:21 -0700 Subject: [PATCH 20/35] Remove obsolete CSS, JavaScripts, and their configuration --- docs/_static/patch_scrollToActive.js | 41 ---------------------------- docs/_static/search_shortcut.js | 35 ------------------------ docs/conf.py | 3 +- 3 files changed, 1 insertion(+), 78 deletions(-) delete mode 100644 docs/_static/patch_scrollToActive.js delete mode 100644 docs/_static/search_shortcut.js diff --git a/docs/_static/patch_scrollToActive.js b/docs/_static/patch_scrollToActive.js deleted file mode 100644 index 6cad65df0..000000000 --- a/docs/_static/patch_scrollToActive.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Patch of scrollToActive of sphinxbook theme - * Scroll to active navigation item - */ - -/** - * A helper function to load scripts when the DOM is loaded. - * This waits for everything to be on the page first before running, since - * some functionality doesn't behave properly until everything is ready. - */ - var sbRunWhenDOMLoaded = (cb) => { - if (document.readyState != "loading") { - cb(); - } else if (document.addEventListener) { - document.addEventListener("DOMContentLoaded", cb); - } else { - document.attachEvent("onreadystatechange", function () { - if (document.readyState == "complete") cb(); - }); - } -}; - -/** - * Sidebar scroll on load. - * - * Detect the active page in the sidebar, and scroll so that it is centered on - * the screen. - */ - -var scrollToActive = () => { - let navbar_scrollable = $("#site-navigation").children()[0]; - let active_navigation_item = $("#site-navigation .active").last(); - if (active_navigation_item) { - if (active_navigation_item.offset().top > $(window).height() * 0.5) { - navbar_scrollable.scrollTop = active_navigation_item.offset().top - $(window).height() * 0.2; - } - } -}; - - -sbRunWhenDOMLoaded(scrollToActive); diff --git a/docs/_static/search_shortcut.js b/docs/_static/search_shortcut.js deleted file mode 100644 index b1b7f8813..000000000 --- a/docs/_static/search_shortcut.js +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Add shortcut `ctrl+k` to focus on search field - */ - -$(document).ready(() => { - if (window.location.pathname === '/search.html') { - $('form.bd-search .input-group').hide(); // Hide Sidebar Search field - - $(document).keydown(function(event) { - if ((event.ctrlKey || event.metaKey) && event.key == "k") { - event.preventDefault(); - $('#q').focus(); - } - }); - } else { - $(document).keydown(function(event) { - if ((event.ctrlKey || event.metaKey) && event.key == "k") { - event.preventDefault(); - $('#search-input').focus(); - } - }); - } - - // if OS isn't Mac change visual indication of search field - if (navigator.platform.indexOf('Mac') === -1) { - $('#search-shortcut').html("^"); - $('#search-page-shortcut').html("^"); - } - -}); - -function onReset() { - $('#search-form').trigger('reset'); - $('#search-form').trigger('submit'); -} \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index d845d212d..a7b2e1e90 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -172,8 +172,7 @@ html_logo = "_static/logo.svg" html_favicon = "_static/favicon.ico" -html_css_files = ["custom.css", ("print.css", {"media": "print"})] -html_js_files = ["patch_scrollToActive.js", "search_shortcut.js"] +html_css_files = [("print.css", {"media": "print"})] html_extra_path = [ "robots.txt", From 4f4e65a304bc55dddaeb4d289c1739383d040821 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 10 Apr 2023 02:56:51 -0700 Subject: [PATCH 21/35] Many visitors confuse Training with Documentation, thinking it is the only documentation. --- docs/contributing/index.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/contributing/index.md b/docs/contributing/index.md index 1e2b03f81..3196cd017 100644 --- a/docs/contributing/index.md +++ b/docs/contributing/index.md @@ -1,19 +1,19 @@ --- myst: html_meta: - "description": "Contributing to Plone Trainings Documentation" - "property=og:description": "Contributing to Plone Trainings Documentation" - "property=og:title": "Contributing to Plone Trainings Documentation" + "description": "Contributing to Plone Training" + "property=og:description": "Contributing to Plone Training" + "property=og:title": "Contributing to Plone Training" "keywords": "Plone, Trainings, Plone Contributor Agreement, License, Code of Conduct" --- (contributing-index-label)= -# Contributing to Plone Trainings Documentation +# Contributing to Plone Training -This document describes how to contribute to the Plone Trainings Documentation. +This document describes how to contribute to the Plone Training. -Contributions to the Plone Trainings documentation are welcome. +Contributions to the Plone Training are welcome. (contributing-permission-to-publish-label)= From 18c1cb7c318ff6df8a3898960e28cd1848feacef Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 10 Apr 2023 02:57:44 -0700 Subject: [PATCH 22/35] Tidy navigation --- docs/index.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/index.md b/docs/index.md index 2e5e14262..00ab42cad 100644 --- a/docs/index.md +++ b/docs/index.md @@ -24,7 +24,7 @@ Thank you for your collaboration. ``` ```{toctree} -:caption: Training Overview +:caption: Trainings :maxdepth: 2 :hidden: true @@ -54,7 +54,7 @@ advanced-python/index ``` ```{toctree} -:caption: Plone Trainings +:caption: Appendices :maxdepth: 1 :hidden: true @@ -85,6 +85,7 @@ teaching/index : Best practices for testing Plone add-ons. + ### Volto, React and Javascript {doc}`react/index` @@ -128,8 +129,8 @@ teaching/index and how to integrate your custom JavaScript applications with Plone. Technologies will include NPM, Grunt, Patternslib and React. -### Theming +### Theming {doc}`theming/index` @@ -139,6 +140,7 @@ teaching/index : Create a Diazo-based theme as a Plone 5 add-on. + ### Deployment {doc}`plone-deployment/index` From cee302b84e53575c9c32a0b33a69dab1251e3a0b Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 10 Apr 2023 02:59:09 -0700 Subject: [PATCH 23/35] Add back custom.css, but commented out everything, and will restore things as needed. Configure theme options --- docs/_static/custom.css | 767 ++++++++++++++++++++-------------------- docs/conf.py | 20 +- 2 files changed, 398 insertions(+), 389 deletions(-) diff --git a/docs/_static/custom.css b/docs/_static/custom.css index 0ce80d57b..fa504e281 100644 --- a/docs/_static/custom.css +++ b/docs/_static/custom.css @@ -1,385 +1,394 @@ -:root { - --highlight-searchresult-color: #b9ee9e; - --codeblock-color: #aad993; - /* Add Font Awesome 5 icon and color for todo */ - --pst-icon-clipboard-list: '\f46d'; - --pst-icon-admonition-todo: var(--pst-icon-clipboard-list); - --pst-color-admonition-todo: 161 , 46, 233; +html { + --sbt-color-announcement: #3f0000; } - -.visuallyhidden { - display: none; -} - -pre { - border-radius: 0; - background-color: white; - box-shadow: none; -} - -a, -a:visited { - color: #2980b9; -} - a:hover { - color: #176aa1; - text-decoration: underline; -} - -ul { - list-style-type: square; -} - -ul li>p { - margin-bottom: 0.3rem; -} - -ol li>p { - margin-bottom: 0.3rem; -} - -dt:target, -span.highlighted { - background-color: var(--highlight-searchresult-color); -} - -img { - margin: 1rem 0; -} - -figure img, -.figure img { - box-shadow: 0 6px 24px 0 rgba(153, 153, 153, 0.3); -} - -section { - clear: both; -} - - -.sidebar img.logo { - box-shadow: none; - width: 200px; - margin-bottom: 1rem; -} - -span.linenos { - padding-right: 1em; -} - -p.ploneorglink img { - vertical-align: bottom; -} - -.bd-sidebar .nav ul { - padding: 0 0 0 1rem; -} - -.bd-sidebar .nav .toctree-checkbox~label i { - transform: rotate(90deg); -} - -.bd-sidebar .nav .toctree-checkbox:checked~label i { - transform: rotate(0deg); -} - -.toctree-wrapper .caption { - font-weight: bold; - font-size: 1.2em; - margin-top: 3rem; -} - -.toctree-wrapper ul { - list-style: none; -} - -section:not(#glossary) h1~dl { - display: grid; - grid-template-columns: max-content auto; -} - -section:not(#glossary) h1~dl dd { - margin-bottom: unset !important; -} - -div.section { - margin-bottom: 5rem; -} - -.admonition { - border-radius: 0; - border: none; - border-left: .2rem solid; - border-left-color: rgba(var(--pst-color-admonition-default), 1); -} - -.admonition .admonition-title { - margin-bottom: 1.5rem !important; -} - -.admonition.toggle .admonition-title { - cursor: pointer; - display: flex; -} - -.admonition.toggle .admonition-title::after { - content: "\f105"; - font-weight: 900; - font-family: "Font Awesome 5 Free"; - margin-left: auto; -} - -.admonition.toggle .admonition-title.open::after { - content: "\f107"; -} - -/* admonition todo */ -.admonition.admonition-todo, -div.admonition.admonition-todo { - border-color: rgba(var(--pst-color-admonition-todo),1); -} -.admonition.admonition-todo > .admonition-title, -div.admonition.admonition-todo > .admonition-title { - background-color: rgba(var(--pst-color-admonition-todo),.1); -} -.admonition.admonition-todo > .admonition-title::before, -div.admonition.admonition-todo > .admonition-title::before { - color: rgba(var(--pst-color-admonition-todo),1); - content: var(--pst-icon-admonition-todo); -} - -.topic { - padding: 1.5em 1em .5em 1em; -} - -.topic-title { - font-weight: bold; -} - -/* search */ -/* Show search form. It is hidden by default. */ -#search-documentation, -#search-documentation~form, -#search-documentation~p { - display: block; -} - -#search-form { - display: flex; - flex-direction: row; - align-items: baseline; - flex-wrap: wrap; -} - -#search-form input[type="submit"] { - margin-right: 1rem; -} - -ul.search .title_training::before { - content: ' – '; + --pst-color-link-hover: var(--pst-color-link); } - -p.search-summary { - margin-top: 1em; -} - -#search-results ul { - list-style-type: none; - padding-left: 0; -} - -#search-results ul li { - margin-bottom: 1em; -} - -ul.search li span.highlighted { - background-color: var(--highlight-searchresult-color); -} - -/* short cut search */ -#search-form:focus-within #shortcut-page, -.bd-search:focus-within #shortcut { - display: none; -} - -#shortcut-page.input-group-text { - padding-top: 0; - padding-bottom: 0; -} - -input#q { - border-radius: .25rem 0 0 .25rem; -} - -.form-control:focus { - box-shadow: none; - border-width: 2px; -} - - -/* Search form sidebar */ -.bd-search { - font-size: .8rem; -} - -.bd-search:focus-within #search-input { - border-radius: .25rem; -} - -#shortcut.input-group-text { - padding-top: 0; - padding-bottom: 0; -} - -.bd-search input, -.bd-search .input-group-text { - font-size: .8rem; - padding-left: .5em; -} - -input#search-input { - padding-left: 2.1875rem; - border-radius: .25rem 0 0 .25rem; -} - -.search-icon { - position: absolute; - color: #a4a6a7; - left: .625rem; - z-index: 100; - align-self: center; -} - -.input-group-text kbd { - padding: 0rem 0.4rem; - font-size: 135%; - background-color: #646e79; -} - -/* header-article */ -div.header-article__label { - display: flex; - align-items: center; - margin: 0 auto 0 1em; - font-size: 80%; - overflow: hidden; - white-space: nowrap; -} - -/* submenu */ -.bd-toc { - box-shadow: 0 .2rem .5rem rgba(0, 0, 0, .05), 0 0 .0625rem rgba(0, 0, 0, .1); -} - -/* extra sidebar */ -aside.sidebar:not(.margin) { - width: 40%; - float: right; - clear: right; - margin: .3rem 0 .3rem 0.5em; - padding: 2rem 0 1.5rem 1rem !important; - background-color: rgba(var(--pst-color-admonition-note), .1); - border: none; - border-left: 8px rgba(var(--pst-color-admonition-default), 1) solid; - border-radius: .2rem; - box-shadow: 0 .2rem .5rem rgba(0, 0, 0, .05), 0 0 .0625rem rgba(0, 0, 0, .1); +.bd-header-announcement__content > a { + color: #66e5ff; } - - -aside.sidebar:not(.margin) figure { - margin-top: 0; - padding-top: 0; - margin-left: 0; - padding-left: 0; - text-align: initial; -} - -aside.sidebar:not(.margin) img.logo { - margin-top: 0; - margin-bottom: .3rem; -} - -aside.sidebar:not(.margin) p { - margin-bottom: 0; -} - -aside.sidebar:not(.margin) p.sidebar-title { +.visuallyhidden { display: none; } - -aside.sidebar:not(.margin) div.topic { - padding: .5em 0; - background-color: transparent; - border: none; -} - -aside.sidebar:not(.margin) pre { - margin: .5em 0 1.5em 0; -} - -aside.sidebar:not(.margin) div[class*="highlight-"] { - margin-right: .5em; -} - -aside.sidebar:not(.margin) .admonition { - margin-right: .5em; - background-color: #ffffff; -} - -@media (min-width:768px) { - aside.sidebar:not(.margin) { - width: 50%; - margin-left: 1.5em; - margin-right: -28%; - } -} - - -main.bd-content #main-content dl.simple dt { - margin-top: .8em; -} - -main.bd-content #main-content dl.simple dt:nth-of-type(1) { - margin-top: 0; -} - -main.bd-content #main-content dl.simple dd { - margin-top: .8em; -} - -main.bd-content #main-content dl.simple dt+dd { - margin-top: 0; -} - -.prev-next-bottom { - margin: 20px 0 30px 0; -} - -.prev-next-bottom a.left-prev, -.prev-next-bottom a.right-next { - padding: 5px 10px; - border: 1px solid rgba(0, 0, 0, .2); - max-width: 45%; - overflow-x: hidden; - color: rgba(0, 0, 0, .65); - border-radius: 10px; -} - -/* Local navigation */ -li.nav-item.toc-entry { - line-height: 1.25em; - margin-bottom: 0.25em; -} - -span.guilabel, -span.menuselection { - border: none; - background: #e7f2fa; - border-radius: 4px; - padding: 4px 5px; - font-size: 90%; - font-weight: bold; - font-style: italic; - white-space: nowrap; -} \ No newline at end of file +/*:root {*/ +/* --highlight-searchresult-color: #b9ee9e;*/ +/* --codeblock-color: #aad993;*/ +/* !* Add Font Awesome 5 icon and color for todo *!*/ +/* --pst-icon-clipboard-list: '\f46d';*/ +/* --pst-icon-admonition-todo: var(--pst-icon-clipboard-list);*/ +/* --pst-color-admonition-todo: 161 , 46, 233;*/ +/*}*/ + + +/*pre {*/ +/* border-radius: 0;*/ +/* background-color: white;*/ +/* box-shadow: none;*/ +/*}*/ + +/*a,*/ +/*a:visited {*/ +/* color: #2980b9;*/ +/*}*/ + +/*a:hover {*/ +/* color: #176aa1;*/ +/* text-decoration: underline;*/ +/*}*/ + +/*ul {*/ +/* list-style-type: square;*/ +/*}*/ + +/*ul li>p {*/ +/* margin-bottom: 0.3rem;*/ +/*}*/ + +/*ol li>p {*/ +/* margin-bottom: 0.3rem;*/ +/*}*/ + +/*dt:target,*/ +/*span.highlighted {*/ +/* background-color: var(--highlight-searchresult-color);*/ +/*}*/ + +/*img {*/ +/* margin: 1rem 0;*/ +/*}*/ + +/*figure img,*/ +/*.figure img {*/ +/* box-shadow: 0 6px 24px 0 rgba(153, 153, 153, 0.3);*/ +/*}*/ + +/*section {*/ +/* clear: both;*/ +/*}*/ + + +/*.sidebar img.logo {*/ +/* box-shadow: none;*/ +/* width: 200px;*/ +/* margin-bottom: 1rem;*/ +/*}*/ + +/*span.linenos {*/ +/* padding-right: 1em;*/ +/*}*/ + +/*p.ploneorglink img {*/ +/* vertical-align: bottom;*/ +/*}*/ + +/*.bd-sidebar .nav ul {*/ +/* padding: 0 0 0 1rem;*/ +/*}*/ + +/*.bd-sidebar .nav .toctree-checkbox~label i {*/ +/* transform: rotate(90deg);*/ +/*}*/ + +/*.bd-sidebar .nav .toctree-checkbox:checked~label i {*/ +/* transform: rotate(0deg);*/ +/*}*/ + +/*.toctree-wrapper .caption {*/ +/* font-weight: bold;*/ +/* font-size: 1.2em;*/ +/* margin-top: 3rem;*/ +/*}*/ + +/*.toctree-wrapper ul {*/ +/* list-style: none;*/ +/*}*/ + +/*section:not(#glossary) h1~dl {*/ +/* display: grid;*/ +/* grid-template-columns: max-content auto;*/ +/*}*/ + +/*section:not(#glossary) h1~dl dd {*/ +/* margin-bottom: unset !important;*/ +/*}*/ + +/*div.section {*/ +/* margin-bottom: 5rem;*/ +/*}*/ + +/*.admonition {*/ +/* border-radius: 0;*/ +/* border: none;*/ +/* border-left: .2rem solid;*/ +/* border-left-color: rgba(var(--pst-color-admonition-default), 1);*/ +/*}*/ + +/*.admonition .admonition-title {*/ +/* margin-bottom: 1.5rem !important;*/ +/*}*/ + +/*.admonition.toggle .admonition-title {*/ +/* cursor: pointer;*/ +/* display: flex;*/ +/*}*/ + +/*.admonition.toggle .admonition-title::after {*/ +/* content: "\f105";*/ +/* font-weight: 900;*/ +/* font-family: "Font Awesome 5 Free";*/ +/* margin-left: auto;*/ +/*}*/ + +/*.admonition.toggle .admonition-title.open::after {*/ +/* content: "\f107";*/ +/*}*/ + +/*!* admonition todo *!*/ +/*.admonition.admonition-todo,*/ +/*div.admonition.admonition-todo {*/ +/* border-color: rgba(var(--pst-color-admonition-todo),1);*/ +/*}*/ +/*.admonition.admonition-todo > .admonition-title,*/ +/*div.admonition.admonition-todo > .admonition-title {*/ +/* background-color: rgba(var(--pst-color-admonition-todo),.1);*/ +/*}*/ +/*.admonition.admonition-todo > .admonition-title::before,*/ +/*div.admonition.admonition-todo > .admonition-title::before {*/ +/* color: rgba(var(--pst-color-admonition-todo),1);*/ +/* content: var(--pst-icon-admonition-todo);*/ +/*}*/ + +/*.topic {*/ +/* padding: 1.5em 1em .5em 1em;*/ +/*}*/ + +/*.topic-title {*/ +/* font-weight: bold;*/ +/*}*/ + +/*!* search *!*/ +/*!* Show search form. It is hidden by default. *!*/ +/*#search-documentation,*/ +/*#search-documentation~form,*/ +/*#search-documentation~p {*/ +/* display: block;*/ +/*}*/ + +/*#search-form {*/ +/* display: flex;*/ +/* flex-direction: row;*/ +/* align-items: baseline;*/ +/* flex-wrap: wrap;*/ +/*}*/ + +/*#search-form input[type="submit"] {*/ +/* margin-right: 1rem;*/ +/*}*/ + +/*ul.search .title_training::before {*/ +/* content: ' – ';*/ +/*}*/ + +/*p.search-summary {*/ +/* margin-top: 1em;*/ +/*}*/ + +/*#search-results ul {*/ +/* list-style-type: none;*/ +/* padding-left: 0;*/ +/*}*/ + +/*#search-results ul li {*/ +/* margin-bottom: 1em;*/ +/*}*/ + +/*ul.search li span.highlighted {*/ +/* background-color: var(--highlight-searchresult-color);*/ +/*}*/ + +/*!* short cut search *!*/ +/*#search-form:focus-within #shortcut-page,*/ +/*.bd-search:focus-within #shortcut {*/ +/* display: none;*/ +/*}*/ + +/*#shortcut-page.input-group-text {*/ +/* padding-top: 0;*/ +/* padding-bottom: 0;*/ +/*}*/ + +/*input#q {*/ +/* border-radius: .25rem 0 0 .25rem;*/ +/*}*/ + +/*.form-control:focus {*/ +/* box-shadow: none;*/ +/* border-width: 2px;*/ +/*}*/ + + +/*!* Search form sidebar *!*/ +/*.bd-search {*/ +/* font-size: .8rem;*/ +/*}*/ + +/*.bd-search:focus-within #search-input {*/ +/* border-radius: .25rem;*/ +/*}*/ + +/*#shortcut.input-group-text {*/ +/* padding-top: 0;*/ +/* padding-bottom: 0;*/ +/*}*/ + +/*.bd-search input,*/ +/*.bd-search .input-group-text {*/ +/* font-size: .8rem;*/ +/* padding-left: .5em;*/ +/*}*/ + +/*input#search-input {*/ +/* padding-left: 2.1875rem;*/ +/* border-radius: .25rem 0 0 .25rem;*/ +/*}*/ + +/*.search-icon {*/ +/* position: absolute;*/ +/* color: #a4a6a7;*/ +/* left: .625rem;*/ +/* z-index: 100;*/ +/* align-self: center;*/ +/*}*/ + +/*.input-group-text kbd {*/ +/* padding: 0rem 0.4rem;*/ +/* font-size: 135%;*/ +/* background-color: #646e79;*/ +/*}*/ + +/*!* header-article *!*/ +/*div.header-article__label {*/ +/* display: flex;*/ +/* align-items: center;*/ +/* margin: 0 auto 0 1em;*/ +/* font-size: 80%;*/ +/* overflow: hidden;*/ +/* white-space: nowrap;*/ +/*}*/ + +/*!* submenu *!*/ +/*.bd-toc {*/ +/* box-shadow: 0 .2rem .5rem rgba(0, 0, 0, .05), 0 0 .0625rem rgba(0, 0, 0, .1);*/ +/*}*/ + +/*!* extra sidebar *!*/ +/*aside.sidebar:not(.margin) {*/ +/* width: 40%;*/ +/* float: right;*/ +/* clear: right;*/ +/* margin: .3rem 0 .3rem 0.5em;*/ +/* padding: 2rem 0 1.5rem 1rem !important;*/ +/* background-color: rgba(var(--pst-color-admonition-note), .1);*/ +/* border: none;*/ +/* border-left: 8px rgba(var(--pst-color-admonition-default), 1) solid;*/ +/* border-radius: .2rem;*/ +/* box-shadow: 0 .2rem .5rem rgba(0, 0, 0, .05), 0 0 .0625rem rgba(0, 0, 0, .1);*/ +/*}*/ + + +/*aside.sidebar:not(.margin) figure {*/ +/* margin-top: 0;*/ +/* padding-top: 0;*/ +/* margin-left: 0;*/ +/* padding-left: 0;*/ +/* text-align: initial;*/ +/*}*/ + +/*aside.sidebar:not(.margin) img.logo {*/ +/* margin-top: 0;*/ +/* margin-bottom: .3rem;*/ +/*}*/ + +/*aside.sidebar:not(.margin) p {*/ +/* margin-bottom: 0;*/ +/*}*/ + +/*aside.sidebar:not(.margin) p.sidebar-title {*/ +/* display: none;*/ +/*}*/ + +/*aside.sidebar:not(.margin) div.topic {*/ +/* padding: .5em 0;*/ +/* background-color: transparent;*/ +/* border: none;*/ +/*}*/ + +/*aside.sidebar:not(.margin) pre {*/ +/* margin: .5em 0 1.5em 0;*/ +/*}*/ + +/*aside.sidebar:not(.margin) div[class*="highlight-"] {*/ +/* margin-right: .5em;*/ +/*}*/ + +/*aside.sidebar:not(.margin) .admonition {*/ +/* margin-right: .5em;*/ +/* background-color: #ffffff;*/ +/*}*/ + +/*@media (min-width:768px) {*/ +/* aside.sidebar:not(.margin) {*/ +/* width: 50%;*/ +/* margin-left: 1.5em;*/ +/* margin-right: -28%;*/ +/* }*/ +/*}*/ + + +/*main.bd-content #main-content dl.simple dt {*/ +/* margin-top: .8em;*/ +/*}*/ + +/*main.bd-content #main-content dl.simple dt:nth-of-type(1) {*/ +/* margin-top: 0;*/ +/*}*/ + +/*main.bd-content #main-content dl.simple dd {*/ +/* margin-top: .8em;*/ +/*}*/ + +/*main.bd-content #main-content dl.simple dt+dd {*/ +/* margin-top: 0;*/ +/*}*/ + +/*.prev-next-bottom {*/ +/* margin: 20px 0 30px 0;*/ +/*}*/ + +/*.prev-next-bottom a.left-prev,*/ +/*.prev-next-bottom a.right-next {*/ +/* padding: 5px 10px;*/ +/* border: 1px solid rgba(0, 0, 0, .2);*/ +/* max-width: 45%;*/ +/* overflow-x: hidden;*/ +/* color: rgba(0, 0, 0, .65);*/ +/* border-radius: 10px;*/ +/*}*/ + +/*!* Local navigation *!*/ +/*li.nav-item.toc-entry {*/ +/* line-height: 1.25em;*/ +/* margin-bottom: 0.25em;*/ +/*}*/ + +/*span.guilabel,*/ +/*span.menuselection {*/ +/* border: none;*/ +/* background: #e7f2fa;*/ +/* border-radius: 4px;*/ +/* padding: 4px 5px;*/ +/* font-size: 90%;*/ +/* font-weight: bold;*/ +/* font-style: italic;*/ +/* white-space: nowrap;*/ +/*}*/ diff --git a/docs/conf.py b/docs/conf.py index a7b2e1e90..2d5464e83 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,7 +20,7 @@ project = "Plone Training" copyright = """The text and illustrations in this website are licensed by the Plone Foundation under a Creative Commons Attribution 4.0 - International license.""" + International license""" author = "Plone Community" trademark_name = "Plone" @@ -148,9 +148,6 @@ ".md": "markdown", } -# The encoding of source files. -# source_encoding = "utf-8-sig" - # The master toctree document. master_doc = "index" @@ -168,11 +165,10 @@ # a list of builtin themes. # html_theme = "sphinx_book_theme" - html_logo = "_static/logo.svg" html_favicon = "_static/favicon.ico" -html_css_files = [("print.css", {"media": "print"})] +html_css_files = ["custom.css", ("print.css", {"media": "print"})] html_extra_path = [ "robots.txt", @@ -188,12 +184,16 @@ html_static_path = ["_static"] html_theme_options = { - "repository_url": "https://github.com/plone/training", - "repository_branch": "main", + "announcement": "⚠️ You are viewing the 2022 version of Plone Training. View the latest version. ⚠️", + "logo": { + "text": "Plone Training 2023", + }, "path_to_docs": "docs", - "use_repository_button": True, - "use_issues_button": True, + "repository_branch": "main", + "repository_url": "https://github.com/plone/training", "use_edit_page_button": True, + "use_issues_button": True, + "use_repository_button": True, } From ad46c2f69ba235ba3f242a3f4cedd288f7edd9fc Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 10 Apr 2023 03:01:04 -0700 Subject: [PATCH 24/35] Follow structure of theme template components --- docs/_templates/components/search-field.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 docs/_templates/components/search-field.html diff --git a/docs/_templates/components/search-field.html b/docs/_templates/components/search-field.html new file mode 100644 index 000000000..aae2f9ee1 --- /dev/null +++ b/docs/_templates/components/search-field.html @@ -0,0 +1,17 @@ +{# A bootstrap-styled field that will direct to the `search.html` page when submitted #} + From babef6b9d388b7b6b9bc5a8964ff2a2089fdf041 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 10 Apr 2023 03:25:45 -0700 Subject: [PATCH 25/35] Removed customized search parts to fallback to theme --- docs/_static/searchtools.js | 554 ------------------- docs/_templates/components/search-field.html | 17 - docs/_templates/search-field.html | 19 - docs/_templates/search.html | 136 ----- 4 files changed, 726 deletions(-) delete mode 100644 docs/_static/searchtools.js delete mode 100644 docs/_templates/components/search-field.html delete mode 100644 docs/_templates/search-field.html delete mode 100644 docs/_templates/search.html diff --git a/docs/_static/searchtools.js b/docs/_static/searchtools.js deleted file mode 100644 index 82260d497..000000000 --- a/docs/_static/searchtools.js +++ /dev/null @@ -1,554 +0,0 @@ -/* - * searchtools.js - * ~~~~~~~~~~~~~~~~ - * - * Sphinx JavaScript utilities for the full-text search. - * - * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - - -if (!Scorer) { - /** - * Simple result scoring code. - */ - var Scorer = { - // Implement the following function to further tweak the score for each result - // The function takes a result array [filename, title, anchor, descr, score] - // and returns the new score. - /* - score: function(result) { - return result[4]; - }, - */ - - // query matches the full name of an object - objNameMatch: 11, - // or matches in the last dotted part of the object name - objPartialMatch: 6, - // Additive scores depending on the priority of the object - objPrio: {0: 15, // used to be importantResults - 1: 5, // used to be objectResults - 2: -5}, // used to be unimportantResults - // Used when the priority is not in the mapping. - objPrioDefault: 0, - - // query found in title - title: 15, - partialTitle: 7, - // query found in terms - term: 5, - partialTerm: 2 - }; -} - -if (!splitQuery) { - function splitQuery(query) { - return query.split(/\s+/); - } -} - -/** - * Search Module - */ -var Search = { - - _index : null, - _queued_query : null, - _pulse_status : -1, - - htmlToText : function(htmlString) { - var virtualDocument = document.implementation.createHTMLDocument('virtual'); - var htmlElement = $(htmlString, virtualDocument); - htmlElement.find('.headerlink').remove(); - docContent = htmlElement.find('[role=main]')[0]; - if(docContent === undefined) { - console.warn("Content block not found. Sphinx search tries to obtain it " + - "via '[role=main]'. Could you check your theme or template."); - return ""; - } - return docContent.textContent || docContent.innerText; - }, - - init : function() { - var params = $.getQueryParameters(); - if (params.q) { - var query = params.q[0]; - $('input[name="q"]')[0].value = query; - $('input[name="q"]')[1].value = query; - if (params.training) { - var training = params.training[0]; - $('select[name="training"]')[0].value = training; - } - this.performSearch(query, training); - } - }, - - loadIndex : function(url) { - $.ajax({type: "GET", url: url, data: null, - dataType: "script", cache: true, - complete: function(jqxhr, textstatus) { - if (textstatus != "success") { - document.getElementById("searchindexloader").src = url; - } - }}); - }, - - setIndex : function(index) { - var q; - this._index = index; - if ((q = this._queued_query) !== null) { - this._queued_query = null; - Search.query(q); - } - }, - - hasIndex : function() { - return this._index !== null; - }, - - deferQuery : function(query) { - this._queued_query = query; - }, - - stopPulse : function() { - this._pulse_status = 0; - }, - - startPulse : function() { - if (this._pulse_status >= 0) - return; - function pulse() { - var i; - Search._pulse_status = (Search._pulse_status + 1) % 4; - var dotString = ''; - for (i = 0; i < Search._pulse_status; i++) - dotString += '.'; - Search.dots.text(dotString); - if (Search._pulse_status > -1) - window.setTimeout(pulse, 500); - } - pulse(); - }, - - /** - * perform a search for something (or wait until index is loaded) - */ - performSearch : function(query, training) { - // create the required interface elements - this.out = $('#search-results'); - this.title = $('').appendTo(this.out); - this.dots = $('').appendTo(this.title); - this.status = $('

 

').appendTo(this.out); - this.output = $('