-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Tipue Search #222
Add Tipue Search #222
Conversation
I wouldn't call this finished, but it roughly works ;) |
@@ -0,0 +1,3 @@ | |||
recursive-include mkdocs/themes *.ico *.js *.css *.png *.html *.eot *.svg *.ttf *.woff | |||
recursive-exclude * __pycache__ | |||
recursive-exclude * *.py[co] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why this is showing up here - these changes are already merged.
Excellent! |
Screenshot of @d0ugal's current progress on this... Rough & ready, but working! |
I was actually copying Docker's approach: https://docs.docker.com/jsearch/?q=install However, a modal would make some things a bit easier. |
There are a few bugs I'm still working on, but it's starting to shape up well. |
Very nice! |
Having some issues getting the code is search.py to work under 2 and 3. So I've updated the Tox/Travis run to better highlight the failures (might revert it later if it feels too verbose). I think i might need to look for an alternative to https://docs.python.org/2/library/htmlparser.html - that is the root of the issue. It appears to have changed more than a simple relocation in Python 3. |
Alrighty, I think I'm at a point now where feedback would be useful. I'm not aware of any glaring issues. Search is working fine in the MkDocs and ReadTheDocs themes - interesting to note that they use two different strategys for making this work (MkDocs is modal, Read the docs uses a different page as a modal didn't fit the theme). One outstanding question: Before we just dumped one file in the |
I've checked out your pull request and tested it on a project and I get the traceback below.
|
Ah, good point. I probably havent tested with unicode. I have only fully tested with the MkDocs documentation. |
@fedelibre I just tried with a project containing Unicode (I borrowed the markdown from https://github.com/dongww/php-book). It worked without any issues. Can you show me the project you tried with? It's hard for me to fix when I can't reproduce it yet. |
@d0ugal also side question: does this use the same format as generated with JSON builds? |
@d0ugal I've tried a simple project from scratch and it works fine. |
@tomchristie They use a similar, but different structure. I was hoping to speak to Eric and see if they could make use of this, if so we could sepricate the json command at some point... It appears Tipue isn't flexible |
@fedelibre I'll make a change to output some information - what file it is failing on. This might provide you with enough info or you can just send me that file perhaps. |
@d0ugal I think that I found the reason of the error: if a markdown file doesn't start with an header ( |
aha, thanks! |
@fedelibre That last commit should fix it for you. |
Thanks, I can run the server and compile the site. But I have three issues:
|
Good idea, I'm not sure how best to go about this but I'll give it some thought.
This should now work, fixed a minor issue in cb3a5f6.
Hmm, this is odd. I think I need to find a few online public documentation projects and test this out. I also plan to greatly improve the unit test situation, that should hopefully help identify some issues too. |
@jniggemann From a quick chat on IRC. Partly adding here to remind me to look as I go on holdays soon :)
|
Is it ready to merge? It's a large patch and we're all looking foreword to use it. I hope we can merge it and improve it from time to time. @d0ugal 👍 |
Reminder to self - figure out integrating this with the Django REST framework theme. |
I was planning on doing that, first I want to settle my doubts with Tipue. |
To help move this along I plan to rebase and split the change up. I want to land the index generation first and then implement it in themes - disconnecting the index code from the client side search implementation. |
This rebases the work done in mkdocs#222 and adapts it for to use Lunr rather than Tipue.
This rebases the work done in mkdocs#222 and adapts it for to use Lunr rather than Tipue.
This rebases the work done in mkdocs#222 and adapts it for to use Lunr rather than Tipue.
This seemed to be on the brink of being merged in early December but now seems to have relapsed. Is there any ETA for it being merged or has it been replaced by a Lunr.js approach? |
This rebases the work done in mkdocs#222 and adapts it for to use Lunr rather than Tipue.
@samuelcolvin I've been quietly working on a large refactor of this implementation and I've been getting close. So far I'm happier with the results but I still have work to do - I don't think it is quite fully functional yet. See #457 for the new work being done here. I'll close this PR for now, I didn't want to rebase on this one as there is some interesting discussion etc. here. |
This rebases the work done in mkdocs#222 and adapts it for to use Lunr rather than Tipue.
hello. what is the currently status for searching? is it working? I've just upgraded to version 0.12.2 and it is not working using readthedocs theme. I could not find anything related to search in http://www.mkdocs.org/ |
@gustavosoares Search will be released with |
Successor to #60. Rebased and updated.