squidfunk / mkdocs-material

Documentation that simply works
https://squidfunk.github.io/mkdocs-material/
MIT License
20.99k stars 3.55k forks source link

jekyll implementation - search not responsive #871

Closed vsoch closed 6 years ago

vsoch commented 6 years ago

hey @squidfunk ! I love this theme to the extent I'm creating a version for use with Jekyll, since Jekyll renders lovely on Github pages. I'm having luck thus far, but am hoping to ask for your help with the search. I see you are using lunr, and I've added the lunr directory along with rendered the search content json, but it doesn't seem to be working quite right with your bundled goodness. Can you take a look and see if you have any insight?

The one change is that I changed the path of the bundle files from "javascript" to "js" - might that make a difference? I don't see any bugs / errors in the console - it just doesn't render.

I've been working on this about 8 hours now and I've reached my "I need to ask for help, I'm getting frustrated" point. This theme is so widely used and beautiful, I'm really hoping to have it as close to the original as possible (and with the search). I've implemented lunr on its own in other Github pages repos, but that would mean removing it from your bundle (which I'm not sure how to do, it would trigger a bug). So that is always another option if you aren't sure. Thank you for your help!

squidfunk commented 6 years ago

Thanks for your question. It's pretty hard to say what goes wrong without skimming through a lot of your code actually. I realized the sidebar also doesn't work. You probably forgot to set some attributes or IDs on elements while porting the theme. My advice would be to skim through the application.js line-by-line and check if you set everything. For the sidebar, the overlay shows but the drawer is not expanded. The search doesn't trigger at all. I'm afraid I don't have the time to debug it with you together but if you stick to the HTML structure it should basically be no problem getting it working. There's also a port for Paradox, another static site generator.

squidfunk commented 6 years ago

Closing this issue, as I consider it an answered question. If you have questions regarding the general architecture, feel free to ask here or on the official Gitter channel.

vsoch commented 6 years ago

Thanks again for your help on this @squidfunk, I’m still debugging! I too hope to figure it out.