-
+ {{#checkIf @config.custom.searchMode '===' "external"}}
+
+ {{#if @config.custom.searchForceWebsiteResults}}
+
+ {{/if}}
+ {{/checkIf}}
+ {{#checkIf @config.custom.searchMode '===' "internal"}}
+
+ {{/checkIf}}
From 7112a8c484de1777731434aedb29075bebac336c Mon Sep 17 00:00:00 2001
From: wuniversales <48658161+wuniversales@users.noreply.github.com>
Date: Sun, 4 Oct 2020 00:24:09 +0200
Subject: [PATCH 02/10] Update config.json
---
.../default-themes/simple/config.json | 128 +++++++++++++++++-
1 file changed, 124 insertions(+), 4 deletions(-)
diff --git a/app/default-files/default-themes/simple/config.json b/app/default-files/default-themes/simple/config.json
index a9c5c598e..b368fde28 100755
--- a/app/default-files/default-themes/simple/config.json
+++ b/app/default-files/default-themes/simple/config.json
@@ -869,16 +869,53 @@
"value": false,
"type": "checkbox"
},
+ {
+ "name": "searchMode",
+ "label": "Select the search mode",
+ "group": "Search",
+ "note": "Select the search mode you want.
The
external mode allows you to search from any external search engine in an advanced way.
The
internal mode will integrate the search results on your website.",
+ "value": "external",
+ "type": "select",
+ "dependencies": [{
+ "field": "search",
+ "value": "true"
+ }],
+ "options": [
+ {
+ "label": "External mode",
+ "value": "external"
+ },
+ {
+ "label": "Internal mode",
+ "value": "internal"
+ }
+ ]
+ },
{
- "name": "searchId",
+ "name": "separator",
+ "type": "separator",
+ "label": "Search configuration",
"group": "Search",
- "label": "Google Custom Search Id",
- "note": "A search ID is required for search functionality, which uses Google Custom Search. Learn how to configure it here:
https://www.getpublii.com/docs/...",
- "value": "",
+ "size": "big",
+ "dependencies": [{
+ "field": "search",
+ "value": "true"
+ }]
+ },
+ {
+ "name": "searchServer",
+ "group": "Search",
+ "label": "Search engine",
+ "note": "Enter the URL of the search engine you want to use on your website.",
+ "value": "https://duckduckgo.com",
"type": "text",
"dependencies": [{
"field": "search",
"value": "true"
+ },
+ {
+ "field": "searchMode",
+ "value": "external"
}]
},
{
@@ -893,6 +930,89 @@
"value": "true"
}]
},
+ {
+ "name": "searchMethod",
+ "label": "Form Method",
+ "group": "Search",
+ "note": "Select the method you want to use for your search engine.",
+ "value": "get",
+ "type": "select",
+ "dependencies": [{
+ "field": "search",
+ "value": "true"
+ },
+ {
+ "field": "searchMode",
+ "value": "external"
+ }],
+ "options": [
+ {
+ "label": "Post",
+ "value": "post"
+ },
+ {
+ "label": "Get",
+ "value": "get"
+ }
+ ]
+ },
+ {
+ "name": "searchForceWebsiteResults",
+ "label": "Only show results from your website",
+ "group": "Search",
+ "value": true,
+ "type": "checkbox",
+ "dependencies": [{
+ "field": "search",
+ "value": "true"
+ },
+ {
+ "field": "searchMode",
+ "value": "external"
+ }]
+ },
+ {
+ "name": "searchTab",
+ "label": "Open results in new tab",
+ "group": "Search",
+ "value": false,
+ "type": "checkbox",
+ "dependencies": [{
+ "field": "search",
+ "value": "true"
+ }]
+ },
+ {
+ "name": "separator",
+ "type": "separator",
+ "label": "Google search configuration",
+ "group": "Search",
+ "size": "big",
+ "dependencies": [{
+ "field": "search",
+ "value": "true"
+ },
+ {
+ "field": "searchMode",
+ "value": "internal"
+ }]
+ },
+ {
+ "name": "searchId",
+ "group": "Search",
+ "label": "Google Custom Search Id",
+ "note": "A search ID is required for internal mode, which uses Google Custom Search. Learn how to configure it here:
https://www.getpublii.com/docs/...",
+ "value": "",
+ "type": "text",
+ "dependencies": [{
+ "field": "search",
+ "value": "true"
+ },
+ {
+ "field": "searchMode",
+ "value": "internal"
+ }]
+ },
{
"name": "shareFacebook",
From e00f46e98ba257504fc05f9cee1bdaafd3659181 Mon Sep 17 00:00:00 2001
From: wuniversales <48658161+wuniversales@users.noreply.github.com>
Date: Sun, 4 Oct 2020 00:40:44 +0200
Subject: [PATCH 03/10] Update config.json
---
app/default-files/default-themes/simple/config.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/default-files/default-themes/simple/config.json b/app/default-files/default-themes/simple/config.json
index b368fde28..03a9a70f5 100755
--- a/app/default-files/default-themes/simple/config.json
+++ b/app/default-files/default-themes/simple/config.json
@@ -1001,7 +1001,7 @@
"name": "searchId",
"group": "Search",
"label": "Google Custom Search Id",
- "note": "A search ID is required for internal mode, which uses Google Custom Search. Learn how to configure it here:
https://www.getpublii.com/docs/...",
+ "note": "A search ID is required for internal mode functionality, which uses Google Custom Search. Learn how to configure it here:
https://www.getpublii.com/docs/...",
"value": "",
"type": "text",
"dependencies": [{
From da0cb46eb2af90f151c90e8b35f2a7a2cacbc9be Mon Sep 17 00:00:00 2001
From: wuniversales <48658161+wuniversales@users.noreply.github.com>
Date: Sun, 4 Oct 2020 01:11:29 +0200
Subject: [PATCH 04/10] Update config.json
---
.../default-themes/simple/config.json | 44 +++++++++----------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/app/default-files/default-themes/simple/config.json b/app/default-files/default-themes/simple/config.json
index 03a9a70f5..5ee873702 100755
--- a/app/default-files/default-themes/simple/config.json
+++ b/app/default-files/default-themes/simple/config.json
@@ -871,9 +871,9 @@
},
{
"name": "searchMode",
- "label": "Select the search mode",
+ "label": "Mode",
"group": "Search",
- "note": "Select the search mode you want.
The
external mode allows you to search from any external search engine in an advanced way.
The
internal mode will integrate the search results on your website.",
+ "note": "The
external mode allows you to search from any external search engine.
The
integrated mode will integrate the search results on your website.",
"value": "external",
"type": "select",
"dependencies": [{
@@ -882,12 +882,12 @@
}],
"options": [
{
- "label": "External mode",
+ "label": "External",
"value": "external"
},
{
- "label": "Internal mode",
- "value": "internal"
+ "label": "Integrated",
+ "value": "integrated"
}
]
},
@@ -905,10 +905,10 @@
{
"name": "searchServer",
"group": "Search",
- "label": "Search engine",
+ "label": "Engine",
"note": "Enter the URL of the search engine you want to use on your website.",
"value": "https://duckduckgo.com",
- "type": "text",
+ "type": "url",
"dependencies": [{
"field": "search",
"value": "true"
@@ -921,7 +921,7 @@
{
"name": "searchParam",
"group": "Search",
- "label": "Search parameter",
+ "label": "Parameter",
"note": "You can change the default \"q\" search parameter if desired; this is recommended only for advanced users.",
"value": "q",
"type": "text",
@@ -957,29 +957,29 @@
]
},
{
- "name": "searchForceWebsiteResults",
- "label": "Only show results from your website",
+ "name": "searchTab",
+ "label": "Open results in new tab",
"group": "Search",
- "value": true,
+ "value": false,
"type": "checkbox",
"dependencies": [{
"field": "search",
"value": "true"
- },
- {
- "field": "searchMode",
- "value": "external"
}]
},
{
- "name": "searchTab",
- "label": "Open results in new tab",
+ "name": "searchForceWebsiteResults",
+ "label": "Only show results from your website",
"group": "Search",
- "value": false,
+ "value": true,
"type": "checkbox",
"dependencies": [{
"field": "search",
"value": "true"
+ },
+ {
+ "field": "searchMode",
+ "value": "external"
}]
},
{
@@ -994,14 +994,14 @@
},
{
"field": "searchMode",
- "value": "internal"
+ "value": "integrated"
}]
},
{
"name": "searchId",
"group": "Search",
- "label": "Google Custom Search Id",
- "note": "A search ID is required for internal mode functionality, which uses Google Custom Search. Learn how to configure it here:
https://www.getpublii.com/docs/...",
+ "label": "Custom Search Id",
+ "note": "A search ID is required for integrated mode functionality, which uses Google Custom Search. Learn how to configure it here:
https://www.getpublii.com/docs/...",
"value": "",
"type": "text",
"dependencies": [{
@@ -1010,7 +1010,7 @@
},
{
"field": "searchMode",
- "value": "internal"
+ "value": "integrated"
}]
},
From 16603637e3b2c19e44edf9456dfaf3a899ebd876 Mon Sep 17 00:00:00 2001
From: wuniversales <48658161+wuniversales@users.noreply.github.com>
Date: Sun, 4 Oct 2020 01:12:08 +0200
Subject: [PATCH 05/10] Update top.hbs
---
app/default-files/default-themes/simple/partials/top.hbs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/default-files/default-themes/simple/partials/top.hbs b/app/default-files/default-themes/simple/partials/top.hbs
index 30953aa71..316b61c20 100755
--- a/app/default-files/default-themes/simple/partials/top.hbs
+++ b/app/default-files/default-themes/simple/partials/top.hbs
@@ -50,7 +50,7 @@
{{/if}}
{{/checkIf}}
- {{#checkIf @config.custom.searchMode '===' "internal"}}
+ {{#checkIf @config.custom.searchMode '===' "integrated"}}