jekyll-theme-yat
jekyll-theme-yat copied to clipboard
Search page / Search box for the Theme
This theme looks really great! However, it will be better if there is a search box for the theme.
In another Jekyll site I maintained (with ~100 posts) , I used a Jekyll plugin called Simple-Jekyll-Search and it works great. However, as I am not familiar with either Sass or UI design, I am not able to add a search page with corresponding style and create a PR on my own.
Is it possible to add search box and develop a set of style corresponding to the theme in the near future? That will be a great help, thanks!
If it helps, here's a demo for Simple-Jekyll-Search on the Jekyll site I maintained. https://gwcompsci.gitee.io/secondary-pages/2021/04/12/Search.html
Hi @MarkChenYutian
Thanks for the issue, but currently I am busy, actually, this feature is on my plan, I will try to add this feature as soon as possible.
Thanks and regards
I implement a Search Box (Elasticsearch) for Yat Theme based on the work: https://blog.omc.io/elasticsearch-for-jekyll-part-1-ab456ac7c093. It should be easy to apply to the blogs that are using default Yet Theme. The demo: https://alexzhangs.github.io The code: https://github.com/alexzhangs/alexzhangs.github.io
@jeffreytse If you would like, I could open a pull request, minor change on the configuration and documentation would be needed of cause.
Hi @alexzhangs
You're very welcome to contribute to this project, I will cooperate with you on this Elasticsearch function.
Thanks and Regards
@jeffreytse
A branch is created with initial commits (not complete) at: https://github.com/alexforks/jekyll-theme-yat/tree/elasticsearch
Would you create a new branch for jeffreytse/jekyll-theme-yat, then I can open pull request upon it.
The changes I've made so far are not complete:
- The search UI is built with Searchkit by using webpack, the output will be a
.jsfile. Is it possible to handle this process at the Jekyll plugin level? Or just pre-package this.jsfile to the theme plugin. This impacts how the Elasticsearch credential with readonly permission will be handled. - A new gem dependency is introduced: Searchyll, and it's not referring to the official Gem, a repo branch is used instead. How to handle this with plugin?
- No documenting yet.
Hi @alexzhangs
I'm not very satisfied with this solution, especially we need to add another gem to this theme. Instead, I prefer to add a new processor called search-processor to jekyll-spaceship plugin to implement the Elasticsearch feature, what's your opinion?
Thanks and Regards
Hi @jeffreytse
It sounds like a good idea. I'm not a ruby guy, and am not experienced with any Jekyll plugin before. Making the search box a part of Yat Theme is not so far to me, but to be a processor of Jekyll-spaceship you may want to construct the framework code. And let me know if there's any point I may help. I can push the code to a feature branch, then you may move forward from there, If there's anything I may provide I'll go there too.
A heads up on two things:
- Searchyll relies on a set of config site.elasticsearch, not sure how this part will be handled with spaceship config together. But if there's problem to handle it's no harm to leave it alone, since it's only for the indexing stage, and has a pretty much clean boundary with the search UI.
- The layout and the style might be a pain point to fit not only Yet Theme since it's an universal plugin.
Thank you for the brilliant works, I like Yat Theme very much, for both the theme style and the code itself.
Hi @alexzhangs
Firstly, thanks for your idea and opinion, I will draft the solution with jekyll-spaceship, and it certainly will be considerate about the compatibility with other Jekyll themes. If I got any progress, I will let you know.
Thanks and Regards
@jeffreytse
Yeah! An universal search box would be very welcome to the Jekyll world. The Searchkit webpack components are pushed to the branch, that would be all you may started on. Thanks for all your contributions, you made a better world. 🚀
any plan to do this? or some suggestions? Thanks!
Hi @lavine-lmu
I'm quite busy recently, but welcome you to do any contribution.
Thanks & Regards