Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Simon Daron
panikweb
Commits
452d4b1f
Commit
452d4b1f
authored
Jul 14, 2017
by
fred
Browse files
add meta tags for twitter cards
parent
be9dc797
Changes
4
Hide whitespace changes
Inline
Side-by-side
panikweb_templates/templates/base.html
View file @
452d4b1f
...
...
@@ -14,6 +14,12 @@
<meta
property=
"og:title"
content=
"Radio Panik - 105.4 FM"
/>
<meta
property=
"og:image"
content=
"{{ site_url }}{% static 'img/Radio_Panik_Logo_2016-01.png' %}"
/>
<meta
property=
"og:description"
content=
"En vous branchant sur le 105.4 FM, vous pénétrerez plus avant dans l'œil du cyclone…"
/>
<meta
name=
"twitter:card"
content=
"summary"
/>
<meta
name=
"twitter:title"
content=
"Radio Panik - 105.4 FM"
/>
<meta
name=
"twitter:image"
content=
"{{ site_url }}{% static 'img/Radio_Panik_Logo_2016-01.png' %}"
/>
<meta
name=
"twitter:description"
content=
"En vous branchant sur le 105.4 FM, vous pénétrerez plus avant dans l'œil du cyclone…"
/>
{% endblock %}
<link
rel=
"alternate"
type=
"application/rss+xml"
href=
"{% url 'rss-feed' %}"
title=
"News rss feed"
>
...
...
panikweb_templates/templates/emissions/emission_detail.html
View file @
452d4b1f
...
...
@@ -5,13 +5,22 @@
{% block head %}
<meta
property=
"og:title"
content=
"{{ emission.title }}"
/>
<meta
name=
"twitter:title"
content=
"{{ emission.title }}"
/>
{% if emission.image %}
<meta
name=
"twitter:card"
content=
"summary_large_image"
>
<meta
property=
"og:image"
content=
"{{ site_url }}{{ emission.image.url }}"
/>
<meta
name=
"twitter:image"
content=
"{{ site_url }}{{ emission.image.url }}"
/>
{% else %}
<meta
name=
"twitter:card"
content=
"summary"
>
<meta
property=
"og:image"
content=
"{{ site_url }}{% static 'img/Radio_Panik_Logo_2016-01.png' %}"
/>
<meta
name=
"twitter:image"
content=
"{{ site_url }}{% static 'img/Radio_Panik_Logo_2016-01.png' %}"
/>
{% endif %}
{% if emission.subtitle %}
<meta
property=
"og:description"
content=
"{{ emission.subtitle }}"
/>
<meta
name=
"twitter:description"
content=
"{{ emission.subtitle }}"
/>
{% else %}
<meta
property=
"og:description"
content=
"{{ emission.text|safe|striptags|truncatewords:75 }}"
/>
<meta
name=
"twitter:description"
content=
"{{ emission.text|safe|striptags|truncatewords:75 }}"
/>
{% endif %}
{% endblock %}
...
...
panikweb_templates/templates/emissions/episode_detail.html
View file @
452d4b1f
...
...
@@ -4,15 +4,26 @@
{% block head %}
<meta
property=
"og:title"
content=
"{{ episode.emission.title }} - {{ episode.title }}"
/>
<meta
name=
"twitter:title"
content=
"{{ episode.emission.title }} - {{ episode.title }}"
/>
{% if episode.image %}
<meta
name=
"twitter:card"
content=
"summary_large_image"
>
<meta
property=
"og:image"
content=
"{{ site_url }}{{ episode.image.url }}"
/>
<meta
name=
"twitter:image"
content=
"{{ site_url }}{{ episode.image.url }}"
/>
{% elif episode.emission.image %}
<meta
name=
"twitter:card"
content=
"summary_large_image"
>
<meta
property=
"og:image"
content=
"{{ site_url }}{{ episode.emission.image.url }}"
/>
<meta
name=
"twitter:image"
content=
"{{ site_url }}{{ episode.emission.image.url }}"
/>
{% else %}
<meta
name=
"twitter:card"
content=
"summary"
>
<meta
property=
"og:image"
content=
"{{ site_url }}{% static 'img/Radio_Panik_Logo_2016-01.png' %}"
/>
<meta
name=
"twitter:image"
content=
"{{ site_url }}{% static 'img/Radio_Panik_Logo_2016-01.png' %}"
/>
{% endif %}
{% if episode.subtitle %}
<meta
property=
"og:description"
content=
"{{ episode.subtitle }}"
/>
<meta
name=
"twitter:description"
content=
"{{ episode.subtitle }}"
/>
{% else %}
<meta
property=
"og:description"
content=
"{{ episode.text|safe|striptags|truncatewords:75 }}"
/>
<meta
name=
"twitter:description"
content=
"{{ episode.text|safe|striptags|truncatewords:75 }}"
/>
{% endif %}
{% if episode.main_sound %}
<meta
property=
"og:audio"
content=
"{{ site_url }}{{ episode.main_sound|format_url:'ogg' }}"
/>
...
...
panikweb_templates/templates/emissions/newsitem_detail.html
View file @
452d4b1f
...
...
@@ -8,11 +8,17 @@
{% block head %}
<meta
property=
"og:title"
content=
"{{ newsitem.title }}"
/>
<meta
property=
"og:description"
content=
"En vous branchant sur le 105.4 FM, vous pénétrerez plus avant dans l'œil du cyclone…"
/>
<meta
name=
"twitter:title"
content=
"{{ newsitem.title }}"
/>
<meta
property=
"og:description"
content=
"{{ newsitem.text|safe|striptags|truncatewords:75 }}"
/>
<meta
name=
"twitter:description"
content=
"{{ newsitem.text|safe|striptags|truncatewords:75 }}"
/>
{% if newsitem.image %}
<meta
name=
"twitter:card"
content=
"summary_large_image"
>
<meta
property=
"og:image"
content=
"{{ site_url }}{{ newsitem.image.url }}"
/>
<meta
name=
"twitter:image"
content=
"{{ site_url }}{{ newsitem.image.url }}"
/>
{% else %}
<meta
name=
"twitter:card"
content=
"summary"
>
<meta
property=
"og:image"
content=
"{{ site_url }}% static 'img/Radio_Panik_Logo_2016-01.png' %}"
/>
<meta
name=
"twitter:image"
content=
"{{ site_url }}{% static 'img/Radio_Panik_Logo_2016-01.png' %}"
/>
{% endif %}
{% endblock %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment