Added some meta tags for "SEO" (fake ass concept for this) but hopefully works for embeds
This commit is contained in:
@@ -5,6 +5,19 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="csrf-token" content={get_csrf_token()} />
|
<meta name="csrf-token" content={get_csrf_token()} />
|
||||||
<link rel="icon" href={~p"/favicon.ico"} sizes="any" />
|
<link rel="icon" href={~p"/favicon.ico"} sizes="any" />
|
||||||
|
<%
|
||||||
|
meta_title = (assigns[:page_title] || "Mixer")
|
||||||
|
meta_description = assigns[:page_description] || "Mixer is a social feed for all. Come join the conversation — built with Elixir."
|
||||||
|
%>
|
||||||
|
<meta name="description" content={meta_description} />
|
||||||
|
<meta name="robots" content={assigns[:robots] || "index, follow"} />
|
||||||
|
<meta property="og:site_name" content="Mixer" />
|
||||||
|
<meta property="og:title" content={meta_title} />
|
||||||
|
<meta property="og:description" content={meta_description} />
|
||||||
|
<meta property="og:type" content="website" />
|
||||||
|
<meta name="twitter:card" content="summary" />
|
||||||
|
<meta name="twitter:title" content={meta_title} />
|
||||||
|
<meta name="twitter:description" content={meta_description} />
|
||||||
<.live_title suffix=" · Mixer">
|
<.live_title suffix=" · Mixer">
|
||||||
{assigns[:page_title] || "Mixer"}
|
{assigns[:page_title] || "Mixer"}
|
||||||
</.live_title>
|
</.live_title>
|
||||||
|
|||||||
@@ -9,6 +9,26 @@ SPDX-License-Identifier: MIT
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="csrf-token" content={get_csrf_token()} />
|
<meta name="csrf-token" content={get_csrf_token()} />
|
||||||
<link rel="icon" href={~p"/favicon.ico"} sizes="any" />
|
<link rel="icon" href={~p"/favicon.ico"} sizes="any" />
|
||||||
|
<%
|
||||||
|
{spa_title, spa_description} = case @page do
|
||||||
|
"feed" -> {"Mixer · Feed", "See the latest posts from everyone on Mixer."}
|
||||||
|
"tweet" -> {"Mixer · Post", "Read this post and join the conversation on Mixer."}
|
||||||
|
"following" -> {"Mixer · Following", "Posts from the people you follow on Mixer."}
|
||||||
|
"profile" -> {"Mixer · My Profile", "View and manage your Mixer profile."}
|
||||||
|
"users" -> {"Mixer · People", "Discover and follow people on Mixer."}
|
||||||
|
"user-detail" -> {"Mixer · Profile", "View this user's profile and posts on Mixer."}
|
||||||
|
_ -> {"Mixer", "A social feed built in Elixir."}
|
||||||
|
end
|
||||||
|
%>
|
||||||
|
<meta name="description" content={spa_description} />
|
||||||
|
<meta name="robots" content="index, follow" />
|
||||||
|
<meta property="og:site_name" content="Mixer" />
|
||||||
|
<meta property="og:title" content={spa_title} />
|
||||||
|
<meta property="og:description" content={spa_description} />
|
||||||
|
<meta property="og:type" content="website" />
|
||||||
|
<meta name="twitter:card" content="summary" />
|
||||||
|
<meta name="twitter:title" content={spa_title} />
|
||||||
|
<meta name="twitter:description" content={spa_description} />
|
||||||
<.live_title default="Mixer">
|
<.live_title default="Mixer">
|
||||||
{case @page do
|
{case @page do
|
||||||
"feed" -> "Mixer · Feed"
|
"feed" -> "Mixer · Feed"
|
||||||
|
|||||||
Reference in New Issue
Block a user