khusika / FeelIt

A clean, elegant but advanced blog theme for Hugo
https://feelit.khusika.dev
MIT License
163 stars 58 forks source link

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

Open mhagnumdw opened 2 years ago

mhagnumdw commented 2 years ago

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

mhagnumdw commented 2 years ago

Changing from .RelPermalink to .Permalink solves: https://github.com/khusika/FeelIt/blob/92084dcad33b82ae6ce5e263a1cf9c300971248b/layouts/partials/assets.html#L31

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