Add Open Graph meta tags
This commit is contained in:
parent
3c76b79683
commit
77ea5809f5
11
app/views/asciicasts/_discovery_tags.html.erb
Normal file
11
app/views/asciicasts/_discovery_tags.html.erb
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- oEmbed -->
|
||||
<link rel="alternate" type="application/json+oembed" href="<%= page.asciicast_oembed_url(:json) %>" />
|
||||
<link rel="alternate" type="text/xml+oembed" href="<%= page.asciicast_oembed_url(:xml) %>" />
|
||||
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:title" content="<%= page.asciicast_title %>" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="<%= asciicast_url(page.asciicast) %>" />
|
||||
<meta property="og:image" content="<%= asciicast_url(page.asciicast, format: :png) %>" />
|
||||
<meta property="og:description" content="<%= page.description %>" />
|
||||
<meta property="og:site_name" content="asciinema.org" />
|
@ -1,7 +1,6 @@
|
||||
- content_for(:title, page.title)
|
||||
- content_for(:head) do
|
||||
link rel="alternate" type="application/json+oembed" href="#{page.asciicast_oembed_url(:json)}"
|
||||
link rel="alternate" type="text/xml+oembed" href="#{page.asciicast_oembed_url(:xml)}"
|
||||
= render 'discovery_tags', page: page
|
||||
|
||||
.asciicast-page
|
||||
section.cinema
|
||||
|
Loading…
Reference in New Issue
Block a user