Cannot get search to work - pointers requested #468
Closed
sabracrolleton
started this conversation in
General
Replies: 1 comment 2 replies
-
Apparently I screwed something up trying to get a contact form to work. Will start over from scratch. Why is there no contact form example in the example site? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Obviously I am missing something critical since everyone else seems to get search working. In my case, typing something into the search box on the right side of the homepage and hitting enter does not do anything at all. (no response from the running hugo server in the terminal either.)
Calling http://localhost:1313/search/ at the browser url results in a page with header and footer and nothing else.
Any pointers on what I need to check would be really appreciated.
Steps I have taken:
I built a test site on a local machine using Option 3 with the exampleSite. (By the way, the exampleSite could really use a contact form. I found it painful working my way through all the file locations that were needed to get a contact form page to work)
in params.toml
enableSearch = true
in config/_default/config.toml
[outputs]
home = ["HTML", "RSS","JSON"]
config.toml
DefaultContentLanguage = "en"
[outputs]
home = ["HTML", "RSS", "JSON"]
the search.md file from the exampleSite is in the content folder because I created everything using the exampleSite and simply says:
+++
title = "Search"
searchPage = true
type = "search"
+++
hugo v0.124.1+extended linux/amd64 BuildDate=unknown
Browsers tested Chrome, Firefox (both private and non-private settings).
If I call the search form directly http://localhost:1313/search/ and look at the page source, I can see that it is calling
single.html from themes/hugo-clarity/layouts/search,
but I do not see anything to indicate that it is calling the partials (scripts.html or widget.html) from themes/hugo-clarity/layouts/partials/search.
Any clues on what I might have done wrong would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions