Search box not working in jekyll

I try to implement a searchbox following this tutorial and get 404 page not found error like thisád

Your problem is unrelated to the search setup.

You have a page search.html in your repo.

But because of this in your config

permalink: /:year-:month-:day-:title/

the result is /search/. So the page is actually there.


If you want .html then your permalink in the config should be this, with exnsion and no trailing slash.

permalink: /:year-:month-:day-:title:output_ext

Read more on Permalink in the docs. Here are the Builtin Formats

And you also have a page called which becomes /Search/

I would get rid of the one and just keep lowercase /search/

Without building your site locally, I was able to see what paths you have by checking you sitemap.

See for example:


I would recommend linking to your search page from other pages or the menu using the link tag`. Then you can change your permalink setting without having to update URLs on each page.

Go to [Search]({{ site.baseurl }}{% link search.html %})

- that becomes [Search](/search/)

Read more about my site on [About]({{ site.baseurl }}{% link foo/ %})

- that becomes [About](/foo/about/) for example or .html