[Question] Is it possible to search manticore from a static html blog that uses no javascript or php?

I have a static HTML Blog (built with zola)
There is zero php or javascript on or required to use the blog, I want to keep it that way.

I was thinking that there must be a way to run a self hosted search engine for my static blog without using javascript or php.

I imagine the only way would be using a form post?

<form action="http://www.mysearchdomain.com/search?" method="post">
  <input type="text" name="search">
  <input type="submit" value="Search">
</form>

Is there any way to make use of manticore search so that users browsing my blog can make use of a search box even if they have javascript disabled (noscript)?

I really appreciate any responses I get, most of my searches turn up empty when looking for clues…

1 Like

Why not? <form> doesn’t require javascript and once the user is taken to the action you can use Manticore there and render the results. If you want it to be embedded into the original site you can use <iframe>. The thing you’ll need to make sure is that the action includes Access-Control-Allow-Origin: <original domain> (or just *) as an HTTP response header. Read about CORS, I’m not an expert in it, but if you control the other domain it shouldn’t be a big deal to implement what you want.

2 Likes

You will still need some dynamic code somewhere to render HTML for the results page.

Manticore returns the raw data about the results but doesn’t render a ‘pretty’ HTML pages for users.

Would be relatively simple code but would need to be there somewhere, wouldn’t have to be PHP

2 Likes

I would prefer to use rust, its fast and safe.

I have a container setup with manticore installed, now I am just looking for simple examples so that I can get my feet wet with using manticore.

I found this post by Sergey, its well written and easy to follow: 60 lines of code Web crawler and search bar with Wget and Manticore - DEV Community

The index is created by piping recursive wget output into manticore’s db via a load.php file.

In my case Zola actually generates an index during site compile, I have not yet investigated if I can adapt this index for use by manticore, if I could then it might save me some work/time.

The 60 lines of code example uses an index.php for the search interface, in my case i would be initiating the search from a regular html page with a search form.