Skip to content

Instantly share code, notes, and snippets.

@jnowland
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnowland/1a3c3f014515b45db09b to your computer and use it in GitHub Desktop.
Save jnowland/1a3c3f014515b45db09b to your computer and use it in GitHub Desktop.
Open Search in Craft
{# Open Search #}
<link rel="search" type="application/opensearchdescription+xml" href="/news/opensearch.xml" title="Search {{ siteName }}"/>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>{{ siteName }}</ShortName>
<Description>Search {{ siteName }}</Description>
<Url type="text/html" method="get" template="{{ siteUrl }}news/search/?q={searchTerms}" />
<Image height="16" width="16" type="image/vnd.microsoft.icon">{{ siteUrl }}/favicon.ico</Image>
<moz:SearchForm>{{ siteUrl }}news/search</moz:SearchForm>
<Url type="application/opensearchdescription+xml" rel="self" template="{{ siteUrl }}news/opensearch"/>
</OpenSearchDescription>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment