diff options
| author | Samantaz Fox <coding@samantaz.fr> | 2022-10-25 20:39:06 +0200 |
|---|---|---|
| committer | Samantaz Fox <coding@samantaz.fr> | 2022-10-25 20:39:06 +0200 |
| commit | e2ab488e7fccf80ba8dba995df5fa98d0e37267d (patch) | |
| tree | 17afbb081f0bdf1a1931df732e3eeb474c5a56e5 /src | |
| parent | 12db1be87b581b7de616768995e1e69f21a9b691 (diff) | |
| parent | 6f301db11cdb77d29c0420663168386c2483825a (diff) | |
| download | invidious-e2ab488e7fccf80ba8dba995df5fa98d0e37267d.tar.gz invidious-e2ab488e7fccf80ba8dba995df5fa98d0e37267d.tar.bz2 invidious-e2ab488e7fccf80ba8dba995df5fa98d0e37267d.zip | |
Add meta tags to channels (#3347)
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/views/channel.ecr | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/invidious/views/channel.ecr b/src/invidious/views/channel.ecr index 92f81ee4..dea86abe 100644 --- a/src/invidious/views/channel.ecr +++ b/src/invidious/views/channel.ecr @@ -1,7 +1,20 @@ <% ucid = channel.ucid %> <% author = HTML.escape(channel.author) %> +<% channel_profile_pic = URI.parse(channel.author_thumbnail).request_target %> <% content_for "header" do %> +<meta name="description" content="<%= channel.description %>"> +<meta property="og:site_name" content="Invidious"> +<meta property="og:url" content="<%= HOST_URL %>/channel/<%= ucid %>"> +<meta property="og:title" content="<%= author %>"> +<meta property="og:image" content="/ggpht<%= channel_profile_pic %>"> +<meta property="og:description" content="<%= channel.description %>"> +<meta name="twitter:card" content="summary"> +<meta name="twitter:url" content="<%= HOST_URL %>/channel/<%= ucid %>"> +<meta name="twitter:title" content="<%= author %>"> +<meta name="twitter:description" content="<%= channel.description %>"> +<meta name="twitter:image" content="/ggpht<%= channel_profile_pic %>"> +<link rel="alternate" href="https://www.youtube.com/channel/<%= ucid %>"> <title><%= author %> - Invidious</title> <link rel="alternate" type="application/rss+xml" title="RSS" href="/feed/channel/<%= ucid %>" /> <% end %> @@ -19,7 +32,7 @@ <div class="pure-g h-box"> <div class="pure-u-2-3"> <div class="channel-profile"> - <img src="/ggpht<%= URI.parse(channel.author_thumbnail).request_target %>"> + <img src="/ggpht<%= channel_profile_pic %>"> <span><%= author %></span><% if !channel.verified.nil? && channel.verified %> <i class="icon ion ion-md-checkmark-circle"></i><% end %> </div> </div> |
