Added version information in sodo search config

refs https://github.com/TryGhost/Team/issues/1665

- version information allows creating the css bundle link for prod
- adds version information from the config
This commit is contained in:
Rishabh 2022-07-06 10:11:15 +02:00
parent 0aa5748951
commit 67a60353c3
2 changed files with 3 additions and 2 deletions

View File

@ -62,7 +62,7 @@ function getSearchHelper(frontendKey) {
return '';
}
let helper = `<script defer src="${config.get('sodoSearch:url')}" data-sodo-search="${urlUtils.getSiteUrl()}" data-key="${frontendKey}" data-api="${urlUtils.urlFor('api', {type: 'content'}, true)}" crossorigin="anonymous"></script>`;
let helper = `<script defer src="${config.get('sodoSearch:url')}" data-sodo-search="${urlUtils.getSiteUrl()}" data-version="${config.get('sodoSearch:version')}" data-key="${frontendKey}" data-api="${urlUtils.urlFor('api', {type: 'content'}, true)}" crossorigin="anonymous"></script>`;
return helper;
}

View File

@ -132,7 +132,8 @@
"version": "2.2"
},
"sodoSearch": {
"url": "https://unpkg.com/@tryghost/sodo-search@~0.1.0/umd/sodo-search.min.js"
"url": "https://unpkg.com/@tryghost/sodo-search@~0.1.0/umd/sodo-search.min.js",
"version": "0.1.0"
},
"tenor": {
"publicReadOnlyApiKey": null,