This is an automated email from the ASF dual-hosted git repository.
dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git
The following commit(s) were added to refs/heads/master by this push:
new 05612bb Improving documentation of Sling thumbnails
05612bb is described below
commit 05612bba19116ee0585fc970a551ca355ece494c
Author: Dan Klco <[email protected]>
AuthorDate: Wed Jul 14 11:42:44 2021 -0400
Improving documentation of Sling thumbnails
---
org.apache.sling.thumbnails/README.md | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/org.apache.sling.thumbnails/README.md
b/org.apache.sling.thumbnails/README.md
index e9fb87b..383dcad 100644
--- a/org.apache.sling.thumbnails/README.md
+++ b/org.apache.sling.thumbnails/README.md
@@ -68,10 +68,10 @@ The servlet would:
#### CA Config Structure
-The structure for the transformations under the CA Config root should include
files/transformations, as such:
+The structure for the transformations under the CA Config root (e.g.
/conf/global/) should include files/transformations, as such:
```
-{
+/conf/global: {
"jcr:primaryType": "sling:Folder",
"files": {
"jcr:primaryType": "sling:Folder",
@@ -111,11 +111,13 @@ This library can be installed on Sling 11+ but does
require the following librar
- org.apache.servicemix.bundles:org.apache.servicemix.bundles.poi:4.1.2_2
- org.apache.servicemix.bundles:org.apache.servicemix.bundles.xmlbeans:3.1.0_2
-And a service user `sling-thumbnails` with the following permissions:
+Add a service user `sling-thumbnails` with the following permissions:
- jcr:write,jcr:nodeTypeManagement,jcr:versionManagement on /content
- jcr:read on /
+Add a service user mapping:
`org.apache.sling.thumbnails:sling-commons-thumbnails=sling-thumbnails`
+
Note that this library generates [Sling Feature
Models](https://sling.apache.org/documentation/development/feature-model.html)
which can be used to install it easily with the Sling Feature Launcher:
-
org.apache.sling:org.apache.sling.thumbnails:slingosgifeature:base:{RELEASE_VERSION}
@@ -134,6 +136,13 @@ PID =
org.apache.sling.thumbnails.internal.ThumbnailSupportImpl
supportedTypes = [nt:file=jcr:content/jcr:mimeType]
```
+The the values should be set as follows:
+
+ - `errorResourcePath` - the path to a resource to transform if an error
occurs instead of returning the default error page
+ - `errorSuffix` - the transformation to call on the error resource if an
error occurs instead of returning the default error page
+ - `persistedTypes` - The types which support persistence of renditions in the
format _resourceType=rendition-path_
+ - `supportedTypes` - The types which support thumbnail generation and
transformation in the format _resourceType=metdata-path_
+
Generally, this configuration should be provided by the application including
this functionality. See
[ThumbnailSupportConfig](src/main/java/org/apache/sling/thumbnails/internal/ThumbnailSupportConfig.java)
for more on the configuration values.
## Primary Concepts