Add oEmbed discovery tags to asciicast page
This commit is contained in:
parent
0930e5fa23
commit
86559fad20
@ -107,6 +107,10 @@ class AsciicastPagePresenter
|
||||
author.asciicasts_excluding(asciicast, 3).decorate
|
||||
end
|
||||
|
||||
def asciicast_oembed_url(routes, format)
|
||||
routes.oembed_url(url: routes.asciicast_url(asciicast), format: format)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def author
|
||||
|
@ -1,4 +1,7 @@
|
||||
- content_for(:title, page.title)
|
||||
- content_for(:head) do
|
||||
link rel="alternate" type="application/json+oembed" href="#{page.asciicast_oembed_url(self, :json)}"
|
||||
link rel="alternate" type="text/xml+oembed" href="#{page.asciicast_oembed_url(self, :xml)}"
|
||||
|
||||
.asciicast-page
|
||||
section.cinema
|
||||
|
@ -11,6 +11,7 @@ html[lang="en"]
|
||||
= javascript_include_tag "player"
|
||||
= favicon_link_tag 'favicon.png'
|
||||
= render 'layouts/ga' if Rails.env.production?
|
||||
= content_for(:head)
|
||||
body
|
||||
= render 'layouts/header'
|
||||
= render 'shared/flash'
|
||||
|
Loading…
Reference in New Issue
Block a user