khusika/FeelIt

[BUG] [search] wrong url for index.json with canonifyURLs = true

mhagnumdw opened this issue · 1 comments

Describe the bug

if canonifyURLs = true is set in config.toml, baseURL is not used to get index.json. So the search doesn't work.

baseURL = "https://group.pages-gitlab.mydomain.com.br/techblog/"

Browser console: VM1586:1 GET https://group.pages-gitlab.mydomain.com.br/techblog/index.json 404 (Not Found)

Expected behavior

The search works with canonifyURLs = true and the baseURL is /something.

Build Environment

Changing from .RelPermalink to .Permalink solves:

{{- $config = dict "type" "lunr" "lunrIndexURL" .RelPermalink | dict "search" | merge $config -}}

Tested with canonifyURLs = true and canonifyURLs = false (hugo default).