Feature: OG Social media cards

Not Original Gangsta, but ObjectGraph

Reason: images were showing on LinkedIn, but small.
This commit is contained in:
2026-05-10 21:34:07 +01:00
parent 764585c642
commit 061787e897
13 changed files with 300 additions and 105 deletions
@@ -8,7 +8,11 @@ defmodule FirehoseWeb.BlogController do
page = parse_page(params["page"])
result = blog.paginate(page)
render(conn, :index,
meta = Blogex.SEO.meta_tags_for_blog(blog, FirehoseWeb.Endpoint.url())
conn
|> FirehoseWeb.Layouts.put_content_for(:meta_tags, meta)
|> render(:index,
page_title: blog.title(),
blog_title: blog.title(),
blog_description: blog.description(),
@@ -24,9 +28,14 @@ defmodule FirehoseWeb.BlogController do
post = blog.get_post!(slug)
visibility = Blogex.Post.visibility(post)
render(conn, :show,
meta = Blogex.SEO.meta_tags(post, FirehoseWeb.Endpoint.url(), blog)
conn
|> FirehoseWeb.Layouts.put_content_for(:meta_tags, meta)
|> render(:show,
page_title: post.title,
post: post,
meta: meta,
base_path: blog.base_path(),
visibility: visibility,
authenticated: !!(conn.assigns[:current_scope] && conn.assigns.current_scope.user)