dsrkafuu / hugo-theme-fuji

A minimal Hugo theme with nice theme color. | 一个主题色极简 Hugo 主题。
https://github.dsrkafuu.net/hugo-theme-fuji/
Apache License 2.0
366 stars 97 forks source link

Search using baseURL with subpage results into index.json not found #38

Closed rrtjr closed 4 years ago

rrtjr commented 4 years ago

Hello,

I just want to ask if there's a workaround for the search function given that my base URL has a subpage?

With a base URL of http://localhost:1313/brain-dump/ for example, index.json is being searched on the root level (http://localhost:1313/).

image

It exists however when accessed using the complete base URL.

image

Is there a way where I can override the index.json file path?

https://github.com/amzrk2/hugo-theme-fuji/blob/007f3ba1c9a9a80a13156bd148cc4ad87af8c5a9/assets/js/fuji.js#L133

I'm not really sure if this is purely a config issue on my part. Your insight would be very helpful. Thanks!

dsrkafuu commented 4 years ago

Thanks for your issue. I have fixed the relative link issue just now 😁

Check out this release for more details about how to fix it: https://github.com/amzrk2/hugo-theme-fuji/releases/tag/v2.2.0

rrtjr commented 4 years ago

Hello, seems fixed on my end. Thanks!

danielhollas commented 4 years ago

@amzrk2 I just stumbled on this issue of search as well. It would be nice to add info to README.md about how to setup search (or at least least point people to exampleSite/config.toml where they can see the full example config. Before I saw it, it was not clear to me e.g. how to setup the menus etc.) (I'm new to Hugo)

Great work btw, loving this theme!

dsrkafuu commented 4 years ago

@amzrk2 I just stumbled on this issue of search as well. It would be nice to add info to README.md about how to setup search (or at least least point people to exampleSite/config.toml where they can see the full example config. Before I saw it, it was not clear to me e.g. how to setup the menus etc.) (I'm new to Hugo)

Great work btw, loving this theme!

@danielhollas I tried to add some information about the config files in the README: https://github.com/amzrk2/hugo-theme-fuji/blob/master/README.md#-getting-started