diff --git a/docs/backend/vocabularies.md b/docs/backend/vocabularies.md index 8e89e5909..baa9a05d8 100644 --- a/docs/backend/vocabularies.md +++ b/docs/backend/vocabularies.md @@ -212,7 +212,7 @@ def available_documents_source(context): """Return a vocabulary of documents in the current folder.""" # Get the portal catalog catalog = context.portal_catalog - + # Query for documents brains = catalog.searchResults( portal_type='Document', @@ -221,7 +221,7 @@ def available_documents_source(context): 'depth': 1, }, ) - + # Build vocabulary terms terms = [ SimpleTerm( @@ -231,7 +231,7 @@ def available_documents_source(context): ) for brain in brains ] - + return SimpleVocabulary(terms) ``` @@ -577,18 +577,18 @@ from zope.schema.vocabulary import SimpleVocabulary def authors_vocabulary_factory(context): """Vocabulary of authors from existing content.""" catalog = api.portal.get_tool('portal_catalog') - + # Get unique creators from all content brains = catalog.searchResults( portal_type=['Document', 'News Item', 'Event'], ) - + # Collect unique authors authors = set() for brain in brains: if brain.Creator: authors.add(brain.Creator) - + # Build terms sorted alphabetically terms = [] for author_id in sorted(authors): @@ -598,7 +598,7 @@ def authors_vocabulary_factory(context): fullname = user.getProperty('fullname') or author_id else: fullname = author_id - + terms.append( SimpleTerm( value=author_id, @@ -606,7 +606,7 @@ def authors_vocabulary_factory(context): title=fullname, ) ) - + return SimpleVocabulary(terms) ``` @@ -665,9 +665,9 @@ The response includes the `token` and `title` for each term: ## See Also -- {ref}`fields-label` for field types that use vocabularies -- {doc}`../forms/index` for form handling -- [zope.schema documentation](https://zopeschema.readthedocs.io/) +- {ref}`backend-fields-label` for field types that use vocabularies +- {doc}`/classic-ui/forms` for form handling +- [zope.schema documentation](https://zopeschema.readthedocs.io/en/latest/) - [plone.app.vocabularies source code](https://github.com/plone/plone.app.vocabularies) - [bobtemplates.plone documentation](https://bobtemplatesplone.readthedocs.io/) diff --git a/docs/classic-ui/views.md b/docs/classic-ui/views.md index 0058a687e..f9c10e03b 100644 --- a/docs/classic-ui/views.md +++ b/docs/classic-ui/views.md @@ -717,7 +717,7 @@ However, in most cases: You get the HTML output with `self.index()`. The page template gets a context argument `view`, pointing to the view class instance. The `index` value is usually an instance of [`Products.Five.browser.pagetemplate.ViewPageTemplateFile`](https://github.com/zopefoundation/Zope/blob/d1814d0a6bddb615629b552de10e9aa5ad30a6da/src/Products/Five/browser/pagetemplatefile.py#L35) for full Plone pages or [`zope.pagetemplate.pagetemplatefile.PageTemplateFile`](https://github.com/zopefoundation/zope.pagetemplate/blob/14ba59c98e12517b9f8abcdb24bc882bb435ed7c/src/zope/pagetemplate/pagetemplatefile.py#L43) for HTML snippets without using acquisition. -- View classes should implement the {doc}`interface ` +- View classes should implement the {term}`interface` [`zope.browser.interfaces.IBrowserView`](https://github.com/zopefoundation/zope.browser/blob/1239c75e4e190df992bf34a88b4ead2c952afe86/src/zope/browser/interfaces.py#L27). Views that render page snippets and parts can be direct subclasses of `zope.publisher.browser.BrowserView`, as snippets might not need acquisition support which adds some overhead to the rendering process. diff --git a/docs/conf.py b/docs/conf.py index 333cd42f9..0bdf8b850 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -77,50 +77,51 @@ smartquotes = False # Options for the linkcheck builder -linkcheck_anchors = True -# Ignore localhost +linkcheck_allowed_redirects = { + # All HTTP redirections from the source URI to the canonical URI will be treated as "working". + # Example + # r"https://chrome\.google\.com/webstore/detail/.*": r"https://consent\.google\.com/.*", + # Weblate now temporarily redirects to stop bots and AI + r"https://hosted\.weblate\.org/.*": r"https://hosted\.weblate\.org/\.within\.website/\?redir=/.*", +} linkcheck_ignore = [ # Ignore local and example URLs r"http://127.0.0.1", r"http://localhost", r"http://yoursite", # Ignore static file downloads - r"^/_static/", r"^/_images/", + r"^/_static/", # Ignore pages that require authentication + r"https://classic.demo.plone.org/en/demo/an-image.jpg/@@images-test#srcset", r"https://github.com/orgs/plone/teams/", r"https://github.com/plone/documentation/issues/new", - r"https://classic.demo.plone.org/en/demo/an-image.jpg/@@images-test#srcset", r"https://javascript.plainenglish.io/you-dont-need-lodash-how-i-gave-up-lodash-693c8b96a07c", # Ignore pages that are rate limited or otherwise blocked - r"https://codesandbox.io/", + r"https://codesandbox.io/", #volto r"https://docutils.sourceforge.io/", + r"https://flaviocopes.com", # volto r"https://hosted.weblate.org/", r"https://medium.com", - r"https://pastanaga.io", - r"https://stackoverflow.com", - r"https://v5.reactrouter.com", + r"https://stackoverflow.com", #volto + r"https://v5.reactrouter.com", #volto + r"https://web.archive.org/", r"https://www.merriam-webster.com/", - r"https://www.npmjs.com/", - # Ignore github.com pages with anchors - r"https://github.com/.*#.*", + r"https://www.npmjs.com", #volto + # Bad TLS certificate + r"https://pastanaga.io", # See https://github.com/plone/volto/issues/8399 # Ignore redirects and rate limiting by github.com r"https://github.com/plone/volto/issues", r"https://github.com/plone/volto/pull", + # Ignore github.com pages with anchors + r"https://github.com/.*#.*", # Ignore other specific anchors r"https://browsersl.ist/#", # volto # fluke where Sphinx MyST linkify extension interprets this as a URL r"http://z3c.pt", ] -linkcheck_allowed_redirects = { - # All HTTP redirections from the source URI to the canonical URI will be treated as "working". - # Example - # r"https://chrome\.google\.com/webstore/detail/.*": r"https://consent\.google\.com/.*", - # Weblate now temporarily redirects to stop bots and AI - r"https://hosted\.weblate\.org/.*": r"https://hosted\.weblate\.org/\.within\.website/\?redir=/.*", -} -linkcheck_retries = 1 linkcheck_report_timeouts_as_broken = True +linkcheck_retries = 1 linkcheck_timeout = 5 # The suffix of source filenames. diff --git a/docs/install/containers/images/historical.md b/docs/install/containers/images/historical.md index 6d8294423..17b22d2c6 100644 --- a/docs/install/containers/images/historical.md +++ b/docs/install/containers/images/historical.md @@ -37,7 +37,7 @@ Each release lists only its last version. | Plone release | Last version | Python | Tags | Platforms | | --- | --- | --- | --- | --- | -| 5.2 | 5.2.4 | 3.8.8 | `plone/plone:5.2`, `plone/plone:5.2.4` | linux/amd64 | +| 5.2 | 5.2.14 | 3.8.20 | `plone/plone:5.2`, `plone/plone:5.2.14` | linux/amd64 | | 5.1 | 5.1.6 | 2.7.17 | `plone/plone:5.1`, `plone/plone:5.1.6` | linux/amd64 | | 5.0 | 5.0.8 | 2.7.14 | `plone/plone:5.0`, `plone/plone:5.0.8` | linux/amd64 | | 4.3 | 4.3.19 | 2.7.17 | `plone/plone:4.3`, `plone/plone:4.3.19` | linux/amd64 | @@ -58,6 +58,12 @@ Each release lists only its last version. All images listen on port 8080, and store their data in a {file}`/data` volume. To use an existing database, place its {file}`Data.fs` file at {file}`/data/filestorage/Data.fs` before the first start. +The tags `plone/plone:latest` and `plone/plone:5` point to the Plone 5.2 image. + +Each release also has a demo variant, tagged with a `-demo` suffix, that ships with a Plone site already created. +The demo variants of Plone 4.3 to 5.2 always use the user `admin` with the password `admin`, and don't read the `ADMIN_USER` and `ADMIN_PASSWORD` environment variables. +On their first start, they copy their database into {file}`/data`, unless {file}`/data` already holds a database. + ## Plone 5.2 @@ -68,6 +74,17 @@ docker run -p 8080:8080 -v plone52-data:/data plone/plone:5.2 Then point your browser at `http://localhost:8080`, and add a Plone site with the user `admin` and the password `admin`. +### Plone 5.2 demo variant + +The `plone/plone:5.2-demo` image ships with a Plone site already created with the ID `Plone`. + +```shell +docker run -p 8080:8080 plone/plone:5.2-demo +``` + +Then point your browser at `http://localhost:8080/Plone`, and log in with the user `admin` and the password `admin`. + + ## Plone 5.1 ```shell @@ -77,6 +94,17 @@ docker run -p 8080:8080 -v plone51-data:/data plone/plone:5.1 Then point your browser at `http://localhost:8080`, and add a Plone site with the user `admin` and the password `admin`. +### Plone 5.1 demo variant + +The `plone/plone:5.1-demo` image ships with a Plone site already created with the ID `Plone`. + +```shell +docker run -p 8080:8080 plone/plone:5.1-demo +``` + +Then point your browser at `http://localhost:8080/Plone`, and log in with the user `admin` and the password `admin`. + + ## Plone 5.0 ```shell @@ -86,6 +114,17 @@ docker run -p 8080:8080 -v plone50-data:/data plone/plone:5.0 Then point your browser at `http://localhost:8080`, and add a Plone site with the user `admin` and the password `admin`. +### Plone 5.0 demo variant + +The `plone/plone:5.0-demo` image ships with a Plone site already created with the ID `Plone`. + +```shell +docker run -p 8080:8080 plone/plone:5.0-demo +``` + +Then point your browser at `http://localhost:8080/Plone`, and log in with the user `admin` and the password `admin`. + + ## Plone 4.3 ```shell @@ -95,6 +134,17 @@ docker run -p 8080:8080 -v plone43-data:/data plone/plone:4.3 Then point your browser at `http://localhost:8080`, and add a Plone site with the user `admin` and the password `admin`. +### Plone 4.3 demo variant + +The `plone/plone:4.3-demo` image ships with a Plone site already created with the ID `Plone`. + +```shell +docker run -p 8080:8080 plone/plone:4.3-demo +``` + +Then point your browser at `http://localhost:8080/Plone`, and log in with the user `admin` and the password `admin`. + + ## Plone 4.2 ```shell