sbrl / Pepperminty-Wiki

A wiki in a box
https://peppermint.mooncarrot.space/
Mozilla Public License 2.0
180 stars 22 forks source link

Support opensearch #112

Closed sbrl closed 7 years ago

sbrl commented 7 years ago

If we supported Opensearch, then users would be able to search a wiki from their address bar, which would be seriously cool.

We should look into this to work out how hard it would be to implement.

sbrl commented 7 years ago

Ewwww that link has all sorts of hard things in it! O.o I don't really want to rewrite the search engine to optionally return the results in XML....! That would add a lot of bloat to Pepperminty Wiki at best.

This page looks like it's much easier to implement and easier to understand. Apparently we don't need to return results in XML / RSS / Atom after all.

We could add a layer of abstraction and write a module if anyone wants it.

sbrl commented 7 years ago

Another relevant link: http://www.opensearch.org/Specifications/OpenSearch/1.1

sbrl commented 7 years ago

I've attempted this, but doesn't appear to be working correctly :confused:

If anyone can help, that would be great!

ikisler commented 7 years ago

I can't test this due to work limitations, but could this not be working because your wiki address always includes a path?

According to this page you link to above:

In my case, I always have a URL of https://domain.com/me/whatever/wiki, so I think opensearch will not work using this method?

sbrl commented 7 years ago

Ahhhhh. I think you may be right! I'll take a look at fiddling with the core to remove that pesky path then. Thanks!

sbrl commented 7 years ago

After a bit of fiddling, it's now working! Hooray! Thanks for the help. Turns out I just needed to take a break and come back to it with a fresh mind. And fight with the build system a bit. I really should refactor it a bit.....

sbrl commented 7 years ago

I've also added your PR's to the changelog & you to the credits, @ikisler. Thanks again! :smiley_cat: