Search function to look in title, content, tags and categories #141
-
Hi, I am so grateful for this theme - it is everything I could possibly ask for! Among the many things I really like about this theme is the search functionality. However, it seems to me that it only searches the titles of posts - not the content, categories or tags, which I would like it to. I have serched the Fuse.js help sections and the PaperMod theme documentation, but have not been able to solve the issue. It is quite possible that I misunderstand the inner workings of Fuse.js, but it appears to me that it should be possible to search all the content of posts. This is in my config.toml:
Any help will be greatly appreciated (and apologies in advance if I have overlooked the obvious)! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
@kmunkholm Take a look here hugo-PaperMod/layouts/_default/index.json Lines 1 to 6 in 6c83df5 This is the index where search searches for into,namely
It does search in content, although refer commit message of 77ff1e6 |
Beta Was this translation helpful? Give feedback.
-
Unfortunately I have no programming expertise so I am sorry I am not able to be of any help in resolving this issue. I hope @adityatelange or someone with experience in implementing Fuse.js in HUGO will have the chance to look into this. If it can be of any help, many people seem to have found the following helpful in implementing Fuse.js search to HUGO sites: |
Beta Was this translation helpful? Give feedback.
@kmunkholm Take a look here
hugo-PaperMod/layouts/_default/index.json
Lines 1 to 6 in 6c83df5
This is the index where
search
searches for into,namely
It does search in content, although
It does not search in Taxonomies i.e Tags / Categories.
keys used can be some, all or none from
["title", "permalink", "summary", "content"]
, but cannot be more unless you ovverideindex.json
refer commit m…