mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 05:37:59 +01:00
Add OpenSearch XML description for browsers
This commit is contained in:
parent
7667aec145
commit
a95df5ec42
3 changed files with 12 additions and 1 deletions
10
assets/static/opensearch.xml
Normal file
10
assets/static/opensearch.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<ShortName>Derpibooru</ShortName>
|
||||
<Description>Derpibooru image search</Description>
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<Image width="16" height="16" type="image/x-icon">https://derpibooru.org/favicon.ico</Image>
|
||||
<Image width="64" height="64" type="image/svg+xml">https://derpibooru.org/favicon.svg</Image>
|
||||
<Url type="text/html" method="get" template="https://derpibooru.org/search">
|
||||
<Param name="q" value="{searchTerms}"/>
|
||||
</Url>
|
||||
</OpenSearchDescription>
|
|
@ -17,7 +17,7 @@ defmodule PhilomenaWeb do
|
|||
and import those modules here.
|
||||
"""
|
||||
|
||||
def static_paths, do: ~w(assets favicon.ico favicon.svg robots.txt)
|
||||
def static_paths, do: ~w(assets favicon.ico favicon.svg robots.txt opensearch.xml)
|
||||
|
||||
def controller do
|
||||
quote do
|
||||
|
|
|
@ -15,6 +15,7 @@ html lang="en"
|
|||
link rel="stylesheet" href=dark_stylesheet_path() media="(prefers-color-scheme: dark)"
|
||||
link rel="icon" href=~p"/favicon.ico" type="image/x-icon"
|
||||
link rel="icon" href=~p"/favicon.svg" type="image/svg+xml"
|
||||
link rel="search" type="application/opensearchdescription+xml" title="Derpibooru" href=~p"/opensearch.xml"
|
||||
meta name="generator" content="philomena"
|
||||
meta name="theme-color" content="#618fc3"
|
||||
meta name="format-detection" content="telephone=no"
|
||||
|
|
Loading…
Reference in a new issue