Framework: Please support opensearch

Created on 28 Mar 2017  路  5Comments  路  Source: aurelia/framework

Aurelia's doc hub needs to support opensearch so that i can use other tools for searching in Aurelia docs.
Would be nice to see Aurelia listed in devdocs.io

documentation enhancement

Most helpful comment

That would be doable. We're re-writing our developer hub now with more static generation for SEO purposes. As part of that we generate a search index for runtime. We could also output that in an alternate xml form, if that's all there is to it.

All 5 comments

Can you provide some references or examples for how we could easily support this? I haven't done this work before so I'm not sure what is involved.

goal

A request of http://aurelia.io/hub.html#/doc/api/aurelia/latest?q=bind should point to something like http://aurelia.io/hub.html#/doc/api/aurelia/binding/latest/overview.
Maybe its a good idea to have a 3rd version of documentation where "Articles and Guides" are distilled into a style of something like Library(API). For example like this one Lodash
Or maybe just start with the cheat sheet with:
bind, one-way, two-way, one-time, trigger, delegate, ref, view-model.ref, ...

add OpenSearch

  • add OpenSearch description document to website OpenSearch example
  • the important part is ?q={searchTerms} in <Url type="application/rss+xml" template="http://example.com/?q={searchTerms}
  • reference it in index.html of the app with <link rel="search" type="application/opensearchdescription+xml" title="Aurelia Doc Hub" href="/opensearch.xml" />
  • finally a lot of tasks requiring great diligence which is to map the search string through the router to the anchors in the html documents of the doc hub or simply to the permanent urls of the documentation elements.

lodash is doing a great job on this

Take a look at Lodash docs. In the query you can type filter which produces a permanent link to https://lodash.com/docs/4.17.4#filter

It sounds like we would have to build a search backend to accomplish this. We're trying to avoid any sort of backend or server requirements for hosting our docs. Right now, the entire site is GitHub hosted.

As far as i understand this topic it just means to ship the opensearchdescription.xml with the deployment of the aurelia doc app on github and react to any given search specific inputs.

That would be doable. We're re-writing our developer hub now with more static generation for SEO purposes. As part of that we generate a search index for runtime. We could also output that in an alternate xml form, if that's all there is to it.

Was this page helpful?
0 / 5 - 0 ratings