Skip to content

Commit 5752703

Browse files
committed
edited meta
1 parent 21da764 commit 5752703

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed
9.77 KB
Loading

templates/base.html

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,20 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<meta name="google-site-verification" content="RAskX0UNOnUGX4OiXn7jalIRZj-SwZej5FRKUlBHEnM" />
88
<title>Python.ru{% block title %} {% endblock %}</title>
9+
{% if request.path == "/" %}
10+
<meta property="og:url" content="{{ request.get_host }}">
11+
<meta property="og:image" content="{{ request.get_host }}{% static "images/python_ru_social_thumb.png" %}" />
12+
<meta property="og:title" content="python.ru" />
13+
<meta property="og:description" content="python.ru русскоязычное сообщество языка python" />
14+
<meta property="og:type" content="website" />
15+
<meta property="og:site_name" content="python.ru">
16+
{% else %}
917
{% block head %}
1018

1119
{% endblock %}
20+
{% endif %}
21+
22+
1223
<link media="all" rel="stylesheet" href="{% static "css/all.css" %}" />
1324
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600' rel='stylesheet' type='text/css'>
1425
<link rel="apple-touch-icon" sizes="180x180" href="{% static "favicons/apple-touch-icon.png" %}">
@@ -22,12 +33,7 @@
2233
<script>hljs.initHighlightingOnLoad();</script>
2334
<meta name="theme-color" content="#ffffff">
2435

25-
<meta property="og:url" content="">
26-
<meta property="og:image" content="}" />
27-
<meta property="og:title" content="python.ru" />
28-
<meta property="og:description" content="python.ru русскоязычное сообщество языка python" />
29-
<meta property="og:type" content="website" />
30-
<meta property="og:site_name" content="Хабр">
36+
3137

3238
</head>
3339
<body>

templates/post.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
{% block title %} | {{ post.name }} {% endblock %}
55
{% block head %}
66

7-
<meta property="og:url" content="">
7+
<meta property="og:url" content="{{ request.get_host }}{{ request.get_full_path }}">
88
{% if post.image %}
99
<meta property="og:image" content="{% thumbnail post.image %}" />
10+
{% else %}
11+
<meta property="og:image" content="{{ request.get_host }}{% static "images/python_ru_social_thumb.png" %}" />
1012
{% endif %}
11-
<meta property="og:title" content="python.ru | {{ post.name }} " />
13+
<meta property="og:title" content="{{ post.name }} " />
1214
<meta property="og:description" content="{{ post.description }} " />
1315
<meta property="og:type" content="article" />
1416

0 commit comments

Comments
 (0)