From 4aa5c7505b9c0bcfd2f78e2c3d83d22e4510aaeb Mon Sep 17 00:00:00 2001 From: Mahdi Pourismaiel Date: Mon, 4 May 2020 10:06:59 +0430 Subject: [PATCH 1/2] Add documentation on how to disable a global fragment --- exampleSite/content/docs/fragments/content.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/exampleSite/content/docs/fragments/content.md b/exampleSite/content/docs/fragments/content.md index 32315fbf..7ec682d3 100644 --- a/exampleSite/content/docs/fragments/content.md +++ b/exampleSite/content/docs/fragments/content.md @@ -87,6 +87,22 @@ This would overwrite the global one. Aside from the `content/_global/` directory, you can create `_global/` directory in any section's directory (`content/[section]/_global/`). Each section can have global fragments and if there are multiple fragments with the same name, the fragment closest to the page would override the others. +##### Disabling a global fragment in specific pages/sections + +As global fragments are displayed in all children pages, you might want to +disable them in some of those pages or specific sections. You can do so by +duplicating that fragment in the page you want and disable it there. + +For example if you have `/content/_global/nav.md` and want to disable it in your +blog, create `/content/blog/_global/nav.md` with following configuration: + +``` ++++ +fragment = "nav" +disabled = true ++++ +``` + ### Built-in fragments There are several pre-bundled fragments already available in Syna. You can see the full list and their documentation in the [fragments]({{< ref "fragments" >}}) section. From f235216ead0e959efc0f4d216577917e346f88a7 Mon Sep 17 00:00:00 2001 From: Mahdi Pourismaiel Date: Sun, 10 May 2020 20:03:55 +0430 Subject: [PATCH 2/2] Fix typo in documentation --- exampleSite/content/docs/fragments/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exampleSite/content/docs/fragments/content.md b/exampleSite/content/docs/fragments/content.md index 7ec682d3..d3fb8a59 100644 --- a/exampleSite/content/docs/fragments/content.md +++ b/exampleSite/content/docs/fragments/content.md @@ -89,7 +89,7 @@ Each section can have global fragments and if there are multiple fragments with ##### Disabling a global fragment in specific pages/sections -As global fragments are displayed in all children pages, you might want to +As global fragments are displayed in all child pages, you might want to disable them in some of those pages or specific sections. You can do so by duplicating that fragment in the page you want and disable it there.