hugomods / search

:mag: A powerful, flexible and responsive Hugo client side fuzzy search module.
https://hugomods.com/search/
MIT License
22 stars 11 forks source link

feature request : Can you build the example page as this ? #212

Closed techhubhub closed 6 months ago

techhubhub commented 6 months ago

Can you build the example page as this

image

(picture 1)

instead of

image

(picture 2) notice that if we visit http://localhost:1313/search (http://localhost:1313/search/?q=) will display the picture 1 so we can only set baseURL as http://domain.ltd/search to achieve this ? Best

razonyang commented 6 months ago

Hmm, I didn't get it, there are two modes of this module:

  1. Single search page: standalone page to search and display results, in this way, users have to open the search page.
  2. Modal: pops up a search box on current page.

The example includes both of them, just tweak it to suit your needs, you'll need to adjust it to fit your CSS styles and layouts anyways.

techhubhub commented 6 months ago

I was trying to edit the config, where it displays all the blogs below the search input box without any string. then I was able to use filters to narrow down my the search. ( not sure if was Single search page or Modal) but I think it was a good UI and UX

razonyang commented 6 months ago

where it displays all the blogs below the search input box without any string.

I think this has been fixed, should be empty result if no filters (keywords and taxonomies) applied.

techhubhub commented 6 months ago

where it displays all the blogs below the search input box without any string.

I think this has been fixed, should be empty result if no filters (keywords and taxonomies) applied.

I actually like that as feature. ( and I have been trying to achieve that display for hours)

I switched back to the previous version.

How can we set baseUrl/default url as .com/search ?

razonyang commented 6 months ago

I actually like that as feature. ( and I have been trying to achieve that display for hours)

This won't be accepted, histories should be shown if no filters.

How can we set baseUrl/default url as .com/search ?

If you're talking the example site, it's dynamic, just specify the right baseURL, in your case https://as.com, when you deploy site in production mode, then the search url will be as .com/search.

See https://github.com/hugomods/search/blob/d5733092d96c5ae395a9576ccc81d2b50d393806/exampleSite/layouts/partials/alerts.html#L12-L13

techhubhub commented 6 months ago

so we can put baseUrl=https://as.com in hugo.toml file ?

razonyang commented 6 months ago

yes