Hi,
I am integration Google Search to my hugo website. Now I need to create an extra search page!
How can I add search.html in my hugo website. I’ve tried it by putting it in layouts>_default and other directories but that doesn’t work!
I want my search page url to be https://site/search
frjo
2
Anything placed in the “static” directory will be copied over as is by Hugo.
Here’s something you can try
If you already have the code for the search page.
- Create the search layout and place the code you already have for the search page(search.html in layouts/_defaults)
- Create “content/search.md” or “content/search/_index.md” with the following front matter fields
---
title: "Search"
sitemap:
priority : 0.1
layout: "search"
---
and that’s it. You can then add it into your menu