Closed danikiev closed 1 year ago
it seems that index.json is not loaded (404 error) due to its URL set to the root adress of baseURL, without the complete path.
I don't see any path without /test/
in index.json
.
And also it loads if I enter http://localhost:1313/test/index.json
I don't see any path without
/test/
inindex.json
.And also it loads if I enter
http://localhost:1313/test/index.json
yes, the issue is not the content of index.json. And index.json is present at its correct URL. The problem comes from trying to load index.json with incomplete URL (without the "/test/" subpath). Most probably the issue comes from here: https://github.com/wowchemy/wowchemy-hugo-themes/blob/f47bd809f7688507f4144f9592da038d56542ef3/modules/wowchemy/layouts/partials/site_js.html?plain=1#L115
Oh, you are right. Changing it manually there to "/test/index.json"
fixes the search. Not sure how to provide the correct path from a variable...
Preliminary Checks
Description
In
starter-hugo-academic
if I changebaseURL
inconfig.yaml
tohttps://example.com/test/
, the defaultwowchemy
search produces empty results.Earlier it was working (wowchemy 4.8)
Reproduction Link
https://github.com/wowchemy/starter-hugo-academic
Steps to Reproduce
starter-hugo-academic
:baseURL
to an address with path, e.g. change line 7 of the fileconfig/_default/config.yaml
tobaseURL: 'https://example.com/test/'
hugo server
Expected Result
2 results
Actual Result
Search results are empty
What Hugo Module versions does your site use?
module github.com/wowchemy/starter-hugo-academic
go 1.15
require ( github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify v1.0.0 // indirect github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify-cms v1.0.0 // indirect github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-reveal v1.0.0 // indirect github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5 v5.8.1 )
What operating system(s) are you seeing the problem on?
Windows, Linux
What browser(s) are you seeing the problem on?
Chrome, Firefox
Which Wowchemy template are you using?
starter-hugo-academic
What version of Hugo are you using?
hugo extended v0.115.4