FEATURE: Site setting to control search menu tip addition (#136)
This commit is contained in:
parent
04af2c4d33
commit
5a8bbc3f87
|
@ -30,6 +30,8 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
withPluginApi("0.8", (api) => initialize(api, container));
|
withPluginApi("0.8", (api) => initialize(api, container));
|
||||||
|
|
||||||
|
if (siteSettings.docs_add_search_menu_tip) {
|
||||||
withPluginApi("0.12.6", (api) => {
|
withPluginApi("0.12.6", (api) => {
|
||||||
api.addSearchSuggestion("in:docs");
|
api.addSearchSuggestion("in:docs");
|
||||||
|
|
||||||
|
@ -41,6 +43,7 @@ export default {
|
||||||
};
|
};
|
||||||
api.addQuickSearchRandomTip(tip);
|
api.addQuickSearchRandomTip(tip);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
withPluginApi("1.2.0", (api) => {
|
withPluginApi("1.2.0", (api) => {
|
||||||
if (siteSettings.navigation_menu !== "legacy") {
|
if (siteSettings.navigation_menu !== "legacy") {
|
||||||
|
|
|
@ -5,3 +5,4 @@ en:
|
||||||
docs_tags: "A list of tags to include in docs"
|
docs_tags: "A list of tags to include in docs"
|
||||||
docs_add_solved_filter: "Adds a filter for solved topics -- requires Discourse Solved to be installed and enabled"
|
docs_add_solved_filter: "Adds a filter for solved topics -- requires Discourse Solved to be installed and enabled"
|
||||||
docs_add_to_top_menu: "Adds a link to the top menu to navigate to the Docs view"
|
docs_add_to_top_menu: "Adds a link to the top menu to navigate to the Docs view"
|
||||||
|
docs_add_search_menu_tip: "Adds the tip \"in:docs\" to the search menu random tips"
|
||||||
|
|
|
@ -16,3 +16,6 @@ plugins:
|
||||||
docs_add_to_top_menu:
|
docs_add_to_top_menu:
|
||||||
default: false
|
default: false
|
||||||
client: true
|
client: true
|
||||||
|
docs_add_search_menu_tip:
|
||||||
|
default: true
|
||||||
|
client: true
|
||||||
|
|
Loading…
Reference in New Issue