mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-29 02:19:01 +00:00
fix: title not being selected properly, bump hugo-obsidian for uri fix
This commit is contained in:
parent
dd047305af
commit
23380d0519
2 changed files with 11 additions and 8 deletions
assets/js
|
@ -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…
Add table
Add a link
Reference in a new issue