mediumish-theme-jekyll icon indicating copy to clipboard operation
mediumish-theme-jekyll copied to clipboard

Lunr Search Problem

Open leonyonz opened this issue 3 years ago • 7 comments

Hello, it seems lunr search only can read up to 62 or 63 document/post.

When i add new post, the search can't be used.

Here the sample:

  • Success at 62 or 63 post total (im not sure about it):

image

  • Failed when add new post:

image

leonyonz avatar Dec 17 '20 16:12 leonyonz

How did you get search working in the first place? I can't get it to show any results on a fresh install on Pages.

thatvirtualboy avatar Mar 25 '21 14:03 thatvirtualboy

Hello @thatvirtualboy ummm, im running it on Nginx and everything fine except post limitation that i mention above. For now im make custom search on my website you can look at : https://belajarlinux.id

leonyonz avatar Mar 25 '21 15:03 leonyonz

@thatvirtualboy the search should work normally, when doing jekyll serve open the console and check if lunrsearchengine.js is being found and read

PeterHdd avatar Mar 26 '21 07:03 PeterHdd

Thanks @PeterHdd Here is what I see

Screen Shot 2021-03-26 at 8 59 15 AM

thatvirtualboy avatar Mar 26 '21 15:03 thatvirtualboy

Noticed I had baseURL in _config set to "" not '', however that didn't seem to resolve the issue. When I try a search, here is what it says: Screen Shot 2021-03-26 at 9 06 06 AM

thatvirtualboy avatar Mar 26 '21 15:03 thatvirtualboy

I had a problem with it because I changed the baseurl. I changed the baseurl to / instead of baseurl: /mediumish-theme-jekyll so the blog can be immediately in the main domain. But then I had problems with different url including the search, which I was able to fix by removing the extra /. For example in some places I had {{ site.baseurl }}/{{ post.url }} so I just changed it to {{ site.baseurl }}{{ post.url }} and it worked!

I will try to change baseurl to "" and test it to see what should be changed, so you can just use / if you want the base domain to have the blog

PeterHdd avatar Mar 26 '21 15:03 PeterHdd

Hmm replacing "" with / breaks formatting and throws all sorts of errors. In my prior theme, baseURL was set to "" as well

thatvirtualboy avatar Mar 26 '21 15:03 thatvirtualboy