You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2020/05/29 15:40:10 UTC

[sling-samples] 02/02: Add tags index + move content setup to initial-content

This is an automated email from the ASF dual-hosted git repository.

bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-samples.git

commit 46d27b495079594a1ad80090808502e810a21ef0
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Fri May 29 17:39:49 2020 +0200

    Add tags index + move content setup to initial-content
---
 .../SLING-INF/initial-content/content/articles.json       |  1 +
 .../main/resources/SLING-INF/initial-content/graphql.json |  1 +
 .../oak%3Aindex/{articleFilename.json => articles.json}   |  3 ++-
 .../features/feature-graphql-example-website.json         | 15 +++------------
 4 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/org.apache.sling.graphql.samples.website/src/main/resources/SLING-INF/initial-content/content/articles.json b/org.apache.sling.graphql.samples.website/src/main/resources/SLING-INF/initial-content/content/articles.json
new file mode 100644
index 0000000..fcba3f9
--- /dev/null
+++ b/org.apache.sling.graphql.samples.website/src/main/resources/SLING-INF/initial-content/content/articles.json
@@ -0,0 +1 @@
+{"jcr:primaryType":"sling:Folder","sling:resourceType":"sling:redirect","sling:target":"/content/articles/music.html"}
diff --git a/org.apache.sling.graphql.samples.website/src/main/resources/SLING-INF/initial-content/graphql.json b/org.apache.sling.graphql.samples.website/src/main/resources/SLING-INF/initial-content/graphql.json
new file mode 100644
index 0000000..516442a
--- /dev/null
+++ b/org.apache.sling.graphql.samples.website/src/main/resources/SLING-INF/initial-content/graphql.json
@@ -0,0 +1 @@
+{"jcr:primaryType":"sling:Folder","sling:resourceType":"samples/servlet"}
diff --git a/org.apache.sling.graphql.samples.website/src/main/resources/SLING-INF/initial-content/oak%3Aindex/articleFilename.json b/org.apache.sling.graphql.samples.website/src/main/resources/SLING-INF/initial-content/oak%3Aindex/articles.json
similarity index 86%
rename from org.apache.sling.graphql.samples.website/src/main/resources/SLING-INF/initial-content/oak%3Aindex/articleFilename.json
rename to org.apache.sling.graphql.samples.website/src/main/resources/SLING-INF/initial-content/oak%3Aindex/articles.json
index e1248f6..a1e6792 100644
--- a/org.apache.sling.graphql.samples.website/src/main/resources/SLING-INF/initial-content/oak%3Aindex/articleFilename.json
+++ b/org.apache.sling.graphql.samples.website/src/main/resources/SLING-INF/initial-content/oak%3Aindex/articles.json
@@ -1,7 +1,8 @@
 {
 	"jcr:primaryType": "oak:QueryIndexDefinition",
 	"jcr:name:propertyNames": [
-		"filename"
+		"filename",
+		"tags"
 	],
 	"type": "property",
 	"reindex": false,
diff --git a/org.apache.sling.graphql.samples.website/src/main/resources/features/feature-graphql-example-website.json b/org.apache.sling.graphql.samples.website/src/main/resources/features/feature-graphql-example-website.json
index c2064e2..4ef1493 100644
--- a/org.apache.sling.graphql.samples.website/src/main/resources/features/feature-graphql-example-website.json
+++ b/org.apache.sling.graphql.samples.website/src/main/resources/features/feature-graphql-example-website.json
@@ -31,18 +31,9 @@
     }
   },
   "repoinit:TEXT|true":[
-    "create path (sling:Folder) /content/articles",
-    "set properties on /content/articles",
-    "set sling:resourceType{String} to sling:redirect",
-    "set sling:target to /content/articles/music.html",
-    "end",
-    "",
-    "create path (nt:unstructured) /graphql",
-    "set ACL for everyone",
-    "allow   jcr:read on /graphql",
-    "end",
-    "set properties on /graphql",
-    "set sling:resourceType{String} to samples/servlet",
+    "create path /graphql",
+    "set ACL on /graphql",
+    "allow jcr:read for everyone",
     "end"
   ]
 }
\ No newline at end of file