mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-26 17:59:26 +00:00
15 lines
546 B
Elixir
15 lines
546 B
Elixir
|
defimpl Mobilizon.Service.Metadata, for: Mobilizon.Events.Comment do
|
||
|
alias Phoenix.HTML.Tag
|
||
|
alias Mobilizon.Events.Comment
|
||
|
|
||
|
def build_tags(%Comment{} = comment) 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
|