Jacky Zhao
2022-07-31 23380d0519365d09cb629a66fe2ccba1c56e91f2
fix: title not being selected properly, bump hugo-obsidian for uri fix
2 files modified
11 ■■■■■ changed files
.github/workflows/deploy.yaml 2 ●●● patch | view | raw | blame | history
assets/js/semantic-search.js 9 ●●●●● patch | view | raw | blame | history
.github/workflows/deploy.yaml
@@ -14,7 +14,7 @@
          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
assets/js/semantic-search.js
@@ -25,11 +25,14 @@
registerHandlers(debounce((e) => {
  term = e.target.value
  if (term !== "") {
  searchContents(term)
    .then((res) => res.results.map(entry => ({
      url: entry.object.metadata.url,
        url: entry.object.properties.url,
      content: entry.snippet,
      title: entry.object.title
    })))
        title: entry.object.metadata.title
      })
      ))
    .then(results => displayResults(results))
  }
}))