Skip to content

Commit 82cf51b

Browse files
committed
Update outdated plugin documentation
1 parent 93035e1 commit 82cf51b

File tree

2 files changed

+30
-7
lines changed

2 files changed

+30
-7
lines changed

docs/userGuide/plugins/filterTags.mbdf

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,27 @@ Tags are specified by the `tags` attribute, **and can be attached to any HTML el
1515
<p tags="language--python">print("Hello world")</p>
1616
```
1717

18-
You need to specify the tags to include in `site.json`, under the `tags` option:
18+
You need to specify the tags to include in the `pluginsContext`, under `tags`:
1919

2020
```json
2121
{
2222
...
23-
"tags": ["language--java"]
23+
"plugins" : [
24+
"filterTags"
25+
],
26+
"pluginsContext" : {
27+
"filterTags" : {
28+
"tags": ["language--java"]
29+
}
30+
}
2431
}
2532
```
2633

2734
All other tagged elements will be filtered out. In this case, only the element with the `language--java` tag will be rendered. This is helpful when creating multiple versions of a page without having to maintain separate copies.
2835

2936
</div>
3037

31-
If the `tags` option is not specified in `site.json`, all tagged elements will be rendered.
38+
If the `filterTags` plugin is not enabled in `site.json`, all tagged elements will be rendered.
3239

3340
**You can also use multiple tags in a single HTML element. Specify each tag in the `tags` attribute** separated by a space. An element will be rendered if **any of the tags** matches the one in `site.json`.
3441

@@ -121,7 +128,14 @@ site.json
121128

122129
{
123130
...
124-
"tags": ["-language--*", "language--C#"]
131+
"plugins" : [
132+
"filterTags"
133+
],
134+
"pluginsContext" : {
135+
"filterTags" : {
136+
"tags": ["-language--*", "language--C#"]
137+
}
138+
}
125139
}
126140
```
127141

docs/userGuide/siteConfiguration.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,14 @@ Here is a typical `site.json` file:
5050
"*.mbd",
5151
".git/*"
5252
],
53-
"tags": ["tag1", "tag2"],
53+
"plugins" : [
54+
"filterTags"
55+
],
56+
"pluginsContext" : {
57+
"filterTags" : {
58+
"tags": ["tag1", "tag2"]
59+
}
60+
},
5461
"headingIndexingLevel": 4
5562
}
5663
```
@@ -164,9 +171,11 @@ The ignore pattern follows the [glob pattern used in .gitignore](https://git-scm
164171
The branch that will be deployed to in the remote repo.
165172
</div>
166173

167-
#### **`tags`**
174+
#### **`plugins`**, **`pluginsContext`**
175+
176+
**A list of plugins to load.** Plugins are user-defined extensions that can add custom features to MarkBind. `pluginsContext` contains settings to be applied to the loaded plugins. See [User Guide: Using Plugins](usingPlugins.html) for more details.
168177

169-
**A list of tags to filter page elements.** Page elements with the specified tags are retained, while elements tagged with other tags are removed. Do not specify this option if you want to show everything. See [_User Guide: Tweaking the Page Structure → Using Tags_](tweakingThePageStructure.html#using-tags) section for more information.
178+
The example above uses tags as an example of configuring plugin settings, refer to the [`filterTags` plugin](tweakingThePageStructure.html#filtertags-toggling-alternative-contents-in-a-page) for more details.
170179

171180
#### **`headingIndexingLevel`**
172181

0 commit comments

Comments
 (0)