Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mhagnumdw opened this issue Dec 30, 2021 · 1 comment
Open
Labels
bug Something isn't working

Comments

@mhagnumdw
Copy link

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 mhagnumdw added the bug Something isn't working label Dec 30, 2021
@mhagnumdw
Copy link
Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant