fix: title not being selected properly, bump hugo-obsidian for uri fix

hugo
Jacky Zhao 2 years ago
parent dd047305af
commit 23380d0519

@ -14,7 +14,7 @@ jobs:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Build Link Index
uses: jackyzha0/hugo-obsidian@v2.16
uses: jackyzha0/hugo-obsidian@v2.17
with:
index: true
input: content

@ -25,11 +25,14 @@ function debounce(func, timeout = 300) {
registerHandlers(debounce((e) => {
term = e.target.value
searchContents(term)
.then((res) => res.results.map(entry => ({
url: entry.object.metadata.url,
content: entry.snippet,
title: entry.object.title
})))
.then(results => displayResults(results))
if (term !== "") {
searchContents(term)
.then((res) => res.results.map(entry => ({
url: entry.object.properties.url,
content: entry.snippet,
title: entry.object.metadata.title
})
))
.then(results => displayResults(results))
}
}))

Loading…
Cancel
Save