diff --git a/assets/js/search.js b/assets/js/search.js index 3f08cb37..3035d562 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -149,12 +149,17 @@ function executeQuery(term) { if (results.length > 0) { results.forEach(function (value, key) { + var title = value.item.externalUrl? value.item.title + ''+value.item.externalUrl+'' : value.item.title; + var linkconfig = value.item.externalUrl? 'target="_blank" rel="noopener" href="'+value.item.externalUrl+'"' : 'href="'+value.item.permalink+'"'; resultsHTML = resultsHTML + `
  • - +
    -
    ${value.item.title}
    +
    + ${title} +
    ${value.item.section}·${value.item.date}
    ${value.item.summary}
    diff --git a/layouts/_default/index.json b/layouts/_default/index.json index d431d3d7..fee2c39b 100644 --- a/layouts/_default/index.json +++ b/layouts/_default/index.json @@ -8,6 +8,7 @@ "summary" (.Summary | emojify | safeJS) "content" (.Plain | emojify | safeJS) "permalink" .RelPermalink + "externalUrl" .Params.externalUrl ) -}} {{- end -}} {{- $index | jsonify -}}