Skip to content

Commit ff8663c

Browse files
Add onThisPageNav flag to the ThemeSettings.spec.json (#411)
Resolves: rdar://101345143
1 parent 61100a4 commit ff8663c

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

Sources/SwiftDocC/SwiftDocC.docc/Resources/ThemeSettings.spec.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,8 +821,11 @@
821821
"type": "object",
822822
"description": "flags for enabling or disabling `/documentation` page features.",
823823
"properties": {
824-
"quicknavigation": {
824+
"quickNavigation": {
825825
"$ref": "#/components/schemas/FeatureFlagEnable"
826+
},
827+
"onThisPageNavigator": {
828+
"$ref": "#/components/schemas/FeatureFlagDisable"
826829
}
827830
}
828831
}
@@ -883,6 +886,18 @@
883886
}
884887
}
885888
},
889+
"FeatureFlagDisable": {
890+
"type": "object",
891+
"description": "Disables a feature if `disable` is `true`.",
892+
"required": [
893+
"disable"
894+
],
895+
"properties": {
896+
"disable": {
897+
"type": "boolean"
898+
}
899+
}
900+
},
886901
"URL": {
887902
"type": "string",
888903
"description": "An absolute URL or relative path.",

Sources/docc/DocCDocumentation.docc/customizing-the-appearance-of-your-documentation-pages.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,10 @@ that can be enabled or disabled using `theme-settings.json`.
218218

219219
**Example**
220220

221-
As of the time of writing this, there is only one available "quick navigation"
222-
feature that is disabled by default and can be enabled with the following
223-
configuration. Note that this flag may be dropped in the future and new ones may
221+
If you want to disable the OnThisPageNav right side navigation, you can set the
222+
`features.docs.onThisPageNavigator.disable` to `true`.
223+
224+
Note that some of these flags may be dropped in the future and new ones may
224225
be added as necessary for other features.
225226

226227
```json
@@ -229,6 +230,9 @@ be added as necessary for other features.
229230
"docs": {
230231
"quickNavigation": {
231232
"enable": true
233+
},
234+
"onThisPageNavigator": {
235+
"disable": true
232236
}
233237
}
234238
}

0 commit comments

Comments
 (0)