Skip to content

Commit ab701b6

Browse files
committed
add WebSite schema data
The WebSite schema data can allow Google to show an inline search box for the site.
1 parent 5f6dea1 commit ab701b6

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

root/home.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
<%- rss = "recent"; rss_title = 'Recent CPAN Uploads - MetaCPAN' %>
22
<%- canonical = "/" %>
3+
<script type="application/ld+json">
4+
[
5+
{
6+
"@context": "https://schema.org",
7+
"@type": "WebSite",
8+
"name": "MetaCPAN",
9+
"url": "/",
10+
"image": "/static/icons/metacpan-icon-large.png"
11+
"potentialAction": {
12+
"@type": "SearchAction",
13+
"target": "/search?q={query}",
14+
"query-input": "required name=query",
15+
"query": "required"
16+
}
17+
}
18+
]
19+
</script>
320

421
<div align="center" class="home">
522
<a href="/" class="big-logo" alt="meta::cpan"></a>
10.6 KB
Loading

t/static-files.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ my %files = (
7373
'2a9659e15773869426894fe38acff4b797e17b65',
7474
'root/static/icons/metacpan-icon.png' =>
7575
'1b893940fe0107f9e9da5c50a40320c26f25774a',
76+
'root/static/icons/metacpan-icon-large.png' =>
77+
'b0697c267731b7ee53e8e7a3bbd9f6476c0ba29a',
7678
'root/static/icons/package.png' =>
7779
'cbb30244c85540bedd8761b1394cb5162c98c6b6',
7880
'root/static/icons/page_white.png' =>

0 commit comments

Comments
 (0)