Skip to content

Commit

Permalink
Merge pull request #757 from mpourismaiel/docs/fragments/disable-glob…
Browse files Browse the repository at this point in the history
…al-fragments

Add documentation on how to disable a global fragment
  • Loading branch information
stp-ip authored May 10, 2020
2 parents 6e5c04c + f235216 commit 045b938
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions exampleSite/content/docs/fragments/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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.

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.
Expand Down

0 comments on commit 045b938

Please sign in to comment.