mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-22 16:03:25 +00:00
9c9f1385fb
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
14 lines
573 B
Elixir
14 lines
573 B
Elixir
defimpl Mobilizon.Service.Metadata, for: Mobilizon.Discussions.Comment do
|
|
alias Phoenix.HTML.Tag
|
|
alias Mobilizon.Discussions.Comment
|
|
|
|
def build_tags(%Comment{} = comment, _locale \\ "en") do
|
|
[
|
|
Tag.tag(:meta, property: "og:title", content: comment.actor.preferred_username),
|
|
Tag.tag(:meta, property: "og:url", content: comment.url),
|
|
Tag.tag(:meta, property: "og:description", content: comment.text),
|
|
Tag.tag(:meta, property: "og:type", content: "website"),
|
|
Tag.tag(:meta, property: "twitter:card", content: "summary")
|
|
]
|
|
end
|
|
end
|