mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 22:12:24 +01:00
Add OpenSearch and Google site search support
This commit is contained in:
parent
a79cc758ed
commit
e40b247a97
9
app/public/static/opensearch.xml
Normal file
9
app/public/static/opensearch.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<ShortName>ContentDB</ShortName>
|
||||
<LongName>ContentDB</LongName>
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<Description>Search mods, games, and textures for Minetest.</Description>
|
||||
<Tags>Minetest Mod Game Subgame Search</Tags>
|
||||
<Url type="text/html" method="get" template="https://content.minetest.net/packages?q={searchTerms}"/>
|
||||
</OpenSearchDescription>
|
@ -8,6 +8,7 @@
|
||||
<title>{% block title %}title{% endblock %} - {{ config.USER_APP_NAME }}</title>
|
||||
<link rel="stylesheet" type="text/css" href="/static/bootstrap.css">
|
||||
<link rel="stylesheet" type="text/css" href="/static/custom.css?v=6">
|
||||
<link rel="search" type="application/opensearchdescription+xml" href="/static/opensearch.xml" title="ContentDB" />
|
||||
{% block headextra %}{% endblock %}
|
||||
</head>
|
||||
|
||||
|
@ -4,6 +4,21 @@
|
||||
Welcome
|
||||
{% endblock %}
|
||||
|
||||
{% block scriptextra %}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebSite",
|
||||
"url": "https://content.minetest.net/",
|
||||
"potentialAction": {
|
||||
"@type": "SearchAction",
|
||||
"target": "https://content.minetest.net/packages?q={search_term_string}",
|
||||
"query-input": "required name=search_term_string"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<!-- <header class="jumbotron">
|
||||
<div class="container">
|
||||
|
Loading…
Reference in New Issue
Block a user