Closed gcushen closed 6 years ago
To enable the search widget:
config.toml
(scroll down to config.toml
at bb3adc1 to see the config changes)home/search.md
set active
to true to activate the search widgethugo
commandpublic/search.json
file to the Index page in your Algolia dashboard[params.search.algolia]
section in config.toml
[params.search]
in config.toml
, set engine = 1
to enable the search engineHi, It was not possible with lunrjs ?
Regards,
@anayrat Client-side search has major limitations in terms of handling misspellings, lack of autocompletion, and most importantly, scalability. Algolia does not have any of these limitations and provide a very generous free plan.
Now that the foundation for searching within Academic has been implemented, we may consider integrating alternative search engines in the future :)
Documentation and a demo have now been added:
Docs: https://sourcethemes.com/academic/docs/search/ Demo: https://sourcethemes.com/academic/#search
Just installed your search. It works fine!
But I am afraid that Algolia does not "provide a very generous free plan". After the registration everyone got 14 trial days. But I thought I will immediately change to the free community plan. So I did it. But when I uploaded my generated search.json file it said that I have exceeded the quota. (I had to register anew, as I could not go back to the 14 trial days.)
I was surprised, because I just have started with my website. It is still not officially launched. I have only 12 posts, but 190 publications; many of them with abstracts. But still this is not much content for a website. The search.json file has 213 kB.
The free plan starts with $ 35 a month (which is already a lot of money!), but the limit for this price is already an index of 50 k. With my still very small website I would have to pay already $ 85 / month!
Sure, there is the option of an Algolia Open Source (AOS) discount, but to qualify you must either develop open source software or be a non-profit organization. In either case this is not the community your Academic framework is targeting.
I hope there will be other, better possibilities. To pay several thousand dollars a year for my personal website just for the search engine would no option for me.
I hope there will be other, better possibilities. To pay several thousand dollars a year for my personal website just for the search engine would no option for me.
That's the reason why I'm considering to move to Grav - it is flat-file CMS allowing to write markdown content, no databases, but, otoh, no need to integrate 3rd party services and/or apps to solve the problem of commenting system, search feature, form processing etc.
@gour Thanks for the tip. But there are three reason why I will stick to Hugo:
@petzi53 ok, just short comments inline...
Grav uses Markdown Extra flavor which is good-enough for me and no idea how does it compare with R Markdown.
Grav community is very nice and there are lot of themes and, plugins available and one interesting feature are skeletons providing complete samples of web sites for an easy start.
There is WordPress importer available, but I didn't try it since I moved from WP long ago. Moreover, using Grav is fairly easy and you can using it with GUI (Grav admin) or via CLI.
All in all, I just mentioned Grav since I spent lot of time playing/fiddling with static-site-generators (Nikola, Hugo, Pelican...), but at the end I always had a feeling that the missing parts are not so easy/elegant to be replaced and that's why flat-file CMS like Grav is for me kind of sweet-spot. :-)
All the best in resolving your problem with Hugo. ;)
Grav is PHP based and targeted primarily at the PHP WordPress audience.
Academic's built-in search is now implemented - see #635 and https://sourcethemes.com/academic/docs/search/
@gcushen: Re Grav: Thank you for clarifying. Re: Search. Did you read my previous post on this thread?
I thought about the quota. Maybe the Algolia limit with 100k is not referencing the size of the index file but the number of index records. But how can it be that my small site is already exceeding their free quota?
Search Algolia again: I just received the Algolia "Usage from Aug 06 to Aug 12". And here the statistics shows only 211 records. I have asked them why I couldn't register for community membership and why my upload was rejected, claiming that I had exceeded their quota. I am waiting for their answer…
Report on my contact with Algolia: I am now waiting almost 20 days for an answer. 4 different people from Algoloa have already contacted me, but nobody has known from the other people and nobody has addressed my problem. They just wanted to sell me their product. My 3 weeks grace period is running out…
I have to confess: My trust into Algolia is not very high. –– Hopefully you are looking for another/additional search engine solution
As of Hugo version 0.20.2, the basic functionality is now available to facilitate implementing a search feature in Academic 😃
So far, I have implemented the search index. Next to decide on a third party search provider! I'll provide updates in this thread.