diff options
author | Mahdi Pourismaiel <mpourismaiel@gmail.com> | 2020-08-04 04:31:16 +0300 |
---|---|---|
committer | Mahdi Pourismaiel <mpourismaiel@gmail.com> | 2020-08-04 04:31:16 +0300 |
commit | d6ae1d0b3c1027fc477c78be95c1edb6fbe2f7ff (patch) | |
tree | 3f205342f86bb2d9e3e6227f98eb25e10d099ec5 | |
parent | c09b09c7af5a0cd4da4779f1b89d4585ed404cfa (diff) |
Update documentation and add hide global variable
-rw-r--r-- | exampleSite/content/docs/fragments/content.md | 2 | ||||
-rw-r--r-- | exampleSite/content/docs/global-variables/content.md | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/exampleSite/content/docs/fragments/content.md b/exampleSite/content/docs/fragments/content.md index d3fb8a59..57f44031 100644 --- a/exampleSite/content/docs/fragments/content.md +++ b/exampleSite/content/docs/fragments/content.md @@ -84,6 +84,8 @@ All fragments within this directory are rendered on all pages by default. To overwrite a global fragment create a per page fragment with the same filename. This would overwrite the global one. +Also in order to hide a global fragment in a specific page or section, you can use the [`hide` global variable]({{< ref "global-variables">}}/#hide). + 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. diff --git a/exampleSite/content/docs/global-variables/content.md b/exampleSite/content/docs/global-variables/content.md index a58ec87b..f7fcec41 100644 --- a/exampleSite/content/docs/global-variables/content.md +++ b/exampleSite/content/docs/global-variables/content.md @@ -85,3 +85,15 @@ Action/clickable URL of the image or the icon. *type: string* If `asset.image` is set, `text` will be used as alternative text (alt-text) of the image. + +#### disable +*type: boolean* + +If set to `true`, Syna will not register the fragment. This is useful for drafting fragments. + +**NOTE:** `disable` doesn't register the fragment at all. This means you can not remove a global fragment in a specific page by a duplicate disabled fragment. In order to hide a global fragment in a page, use [`hide`](#hide). + +#### hide +*type: boolean* + +If set to `true`, Syna will not call the fragment and will hide it. Useful for hiding a global fragment in the page. For more information, please checkout [global fragments]({{< ref "docs/fragments">}}/#global-fragments). |