leostera / tldr.jsx

📚 A Reactive web client for tldr-pages
https://tldr.ostera.io
MIT License
1.54k stars 75 forks source link

OpenSearch Description #24

Closed BenjaminHae closed 8 years ago

BenjaminHae commented 8 years ago

How about adding a OpenSearch Description Document. Basically just a xml file telling the browser how to search in the tldr pages. So I could enter the url of the webpage in chromium press tab write "git tag" press enter and I would be on the according tldr-page. Further information: http://www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_description_document0

leostera commented 8 years ago

@BenjaminHae so I followed the specs and looked up how Github did their integration, but it doesn't seem to be working. Any advice?

leostera commented 8 years ago

Ah, according to this: https://code.google.com/p/chromium/issues/detail?id=58801#c3 and this: http://dev.chromium.org/tab-to-search, it will work automatically for a root domain, but not for a path.

leostera commented 8 years ago

I'll make a point to include a "Install search in your browser" link/button during the redesign, leaving this open for further reference.

igorshubovych commented 8 years ago

@ostera as far as I understood those specs we don't need .com domain. we can host all of this (your tool) on tldr-pages.github.io.

leostera commented 8 years ago

@igorshubovych as long as it's pathless then it's fine. We can add the OpenSearch spec at the tldr-pages.github.io level and have it forward the searches to ostera.io/tldr.jsx. I'll submit a PR.

igorshubovych commented 8 years ago

how about just hosting tldr.jsx on tldr-pages.github.io?

leostera commented 8 years ago

Will be the exact same unless we make tldr-pages.github.io be the web-client. It can't have a path.

So tldr-pages.github.io/tldr.jsx won't work either.

igorshubovych commented 8 years ago

yes, but your client is just JS, you can include that JS/CSS into main page.

leostera commented 8 years ago

If we did, then on every new build we'd have to manually update the site. Having an iframe that loads the page saves us a lot of pain and still maintains the tldr-pages being the tldr-pages.

igorshubovych commented 8 years ago

We can push only certain (stable) versions on site.

leostera commented 8 years ago

I work on feature branches (see my PR's to this repo), the master branch will always be the latest stable version of tldr.jsx

leostera commented 8 years ago

Anywho, this is no longer about the OpenSearch. The file is there and I'll include it as an option if we don't use a domain for it, and if we do it'll just work. Closing now.