From 0f70914c1b8c9e0026e8697886d56f296843b83e Mon Sep 17 00:00:00 2001 From: Ben Furfie Date: Sun, 28 Jul 2019 09:32:47 +0100 Subject: [PATCH 1/6] Add details of --force flag to clear:site command --- content/collections/docs/installing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/collections/docs/installing.md b/content/collections/docs/installing.md index c01609d3..b625b2e1 100644 --- a/content/collections/docs/installing.md +++ b/content/collections/docs/installing.md @@ -232,4 +232,4 @@ If you'd like to support multiple languages, head over to [Localization][localiz If you have used Statamic before and know what you're doing, you can choose to clear the default content, storage, settings, theme, assets, and/or users. -Run `php please clear:site` inside your Statamic directory to initiate the clear process. You will be prompted to choose which data you would like to clear. +Run `php please clear:site` inside your Statamic directory to initiate the clear process. You will be prompted to choose which data you would like to clear. If you want to delete everything and start fresh, it's also possible to skip the prompts and wipe everything using `php please clear:site --force`. \ No newline at end of file From 0e1185c38cf20a979755782c41babc5e58542dd5 Mon Sep 17 00:00:00 2001 From: Ben Furfie Date: Sun, 28 Jul 2019 09:38:01 +0100 Subject: [PATCH 2/6] Add info about ability to use first modifier in array --- content/collections/modifiers/first.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/content/collections/modifiers/first.md b/content/collections/modifiers/first.md index 4e829e5e..1b3db5bb 100644 --- a/content/collections/modifiers/first.md +++ b/content/collections/modifiers/first.md @@ -5,6 +5,8 @@ types: - utility id: 3ef1e731-742e-48c2-81f0-6fa916ecda0a --- + +## String Returns the first X characters of a string, where X is any positive integer. ```.language-yaml @@ -18,3 +20,22 @@ title: 2015 Year Books Photos ```.language-output 2015 ``` + +## Array + +Returns the first item of an array. + +```.language-yaml +meat: + - Bacon + - Steak + - Fillet +``` + +``` +{{ meat | first }} +``` + +```.language-output +Bacon +``` \ No newline at end of file From 6a093fd38de5a6bb865767e55247e2f10d183e67 Mon Sep 17 00:00:00 2001 From: Jason Varga Date: Tue, 30 Jul 2019 11:15:41 -0400 Subject: [PATCH 3/6] remove aka --- content/collections/classes/api-globalset.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/collections/classes/api-globalset.md b/content/collections/classes/api-globalset.md index 2ac73e0c..ed99da06 100644 --- a/content/collections/classes/api-globalset.md +++ b/content/collections/classes/api-globalset.md @@ -17,7 +17,7 @@ GlobalSet::all(); // Returns GlobalCollection GlobalSet::find($id); // Returns GlobalSet ``` -## Get a global by handle (aka: slug). +## Get a global by handle. ``` php GlobalSet::whereHandle($handle); // Returns GlobalSet From d5399d30cfdeb60366be4fc9ebd1f1560929f3ec Mon Sep 17 00:00:00 2001 From: Christopher Dosin Date: Thu, 1 Aug 2019 16:32:59 +0300 Subject: [PATCH 4/6] Updated menu docs for child elements (#435) --- content/collections/tags/nav.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/content/collections/tags/nav.md b/content/collections/tags/nav.md index a4375487..48b3f1f8 100755 --- a/content/collections/tags/nav.md +++ b/content/collections/tags/nav.md @@ -161,6 +161,23 @@ The `{{ *recursive children* }}` tag will repeat the contents of the entire `{{ It’s an admittedly weird concept, and might take some fiddling with to truly understand, but is very powerful when fully understood. Take the time. Learn to wield it. A powerful Jedi will you be. +## Children {#children} + +If you want to take more control over your child menu, you can just loop through the `children` array within your menu, instead of repeating the contents of the child elements with `{{ *recursive children* }}`. + +``` +{{ if is_current || is_parent }} + {{ if children }} + + {{ /if }} +{{ /if }} +``` + + ## Hidden Pages {#hidden-pages} A common use-case for navigation is to make some pages "hidden", which means to hide them from the nav, but keep them From aa964e403b684e612c8947d5d99d02db9251a9c8 Mon Sep 17 00:00:00 2001 From: Ben Furfie Date: Wed, 14 Aug 2019 19:16:36 +0100 Subject: [PATCH 5/6] Update Redis docs to fix settings that otherwise result in error --- content/collections/kb/redis-cache.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/collections/kb/redis-cache.md b/content/collections/kb/redis-cache.md index 3a365c6c..98cc7aa1 100644 --- a/content/collections/kb/redis-cache.md +++ b/content/collections/kb/redis-cache.md @@ -45,9 +45,11 @@ That's it. If you need to change the host, port, or database (not common, but us ```.language-env REDIS_HOST=127.0.0.1 REDIS_PORT=6379 -REDIS_DATABASE=0 +REDIS_DATABASE="0" ``` +_Note: It's crucial that you wrap the 0 value of `REDIS_DATABASE` with quotes, otherwise it will evaluate it incorrectly, and result in an the error `\`SELECT\` failed: ERR invalid DB index BUG db is db0`._ + You can also set a prefix by adding: ```.language-env From fff102e707ba2be13e2a334599a3372d4bfb622e Mon Sep 17 00:00:00 2001 From: Ben Furfie Date: Wed, 14 Aug 2019 20:37:37 +0100 Subject: [PATCH 6/6] Add wrapping quotes around redis_database value --- content/collections/kb/redis-queue-for-multiple-sites.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/collections/kb/redis-queue-for-multiple-sites.md b/content/collections/kb/redis-queue-for-multiple-sites.md index 3454800e..ba18cb5a 100644 --- a/content/collections/kb/redis-queue-for-multiple-sites.md +++ b/content/collections/kb/redis-queue-for-multiple-sites.md @@ -18,7 +18,7 @@ QUEUE_DRIVER=redis For each site on your server, you want Redis to use it's own database, or you'll run into troubles. You can do this by adding the following to your `.env` file. Make sure you increase the database number for each site you're running: ```.language-env -REDIS_DATABASE=0 +REDIS_DATABASE="0" ``` By default you have 16 Redis databases at hand.