add: open graph tags for posts and notes
This commit is contained in:
parent
af6fbdf04e
commit
0c509b7001
4 changed files with 97 additions and 20 deletions
|
@ -1,5 +1,43 @@
|
|||
(text "{% extends \"root.html\" %} {% block head %}")
|
||||
(text "{% if journal -%}") (title (text "{{ journal.title }}")) (text "{% else %}") (title (text "Journals - {{ config.name }}")) (text "{%- endif %}")
|
||||
|
||||
(text "{% if note and journal and owner -%}")
|
||||
(meta
|
||||
("name" "og:title")
|
||||
("content" "{{ note.title }}"))
|
||||
|
||||
(meta
|
||||
("name" "description")
|
||||
("content" "View this note from the {{ journal.title }} journal on {{ config.name }}!"))
|
||||
|
||||
(meta
|
||||
("name" "og:description")
|
||||
("content" "View this note from the {{ journal.title }} journal on {{ config.name }}!"))
|
||||
|
||||
(meta
|
||||
("property" "og:type")
|
||||
("content" "website"))
|
||||
|
||||
(meta
|
||||
("name" "og:image")
|
||||
("content" "{{ config.host|safe }}/api/v1/auth/user/{{ owner.username }}/avatar?selector_type=username"))
|
||||
|
||||
(meta
|
||||
("name" "twitter:image")
|
||||
("content" "{{ config.host|safe }}/api/v1/auth/user/{{ owner.username }}/avatar?selector_type=usernamev"))
|
||||
|
||||
(meta
|
||||
("name" "twitter:card")
|
||||
("content" "summary"))
|
||||
|
||||
(meta
|
||||
("name" "twitter:title")
|
||||
("content" "{{ note.title }}"))
|
||||
|
||||
(meta
|
||||
("name" "twitter:description")
|
||||
("content" "View this note from the {{ journal.title }} journal on {{ config.name }}!"))
|
||||
(text "{%- endif %}")
|
||||
(link ("rel" "stylesheet") ("data-turbo-temporary" "true") ("href" "/css/chats.css?v=tetratto-{{ random_cache_breaker }}"))
|
||||
|
||||
(style
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue