Skip to content

Commit f1e33e5

Browse files
committed
tüm sayfaların seo işlemleri bitti.
1 parent a93569c commit f1e33e5

File tree

7 files changed

+85
-29
lines changed

7 files changed

+85
-29
lines changed

Blog/views.py

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ def home(request):
1010
last_db = post.objects.order_by()[:3]
1111
return render(request, 'profil.html', {
1212
'db': db,
13-
'last_db':last_db
13+
'last_db':last_db,
14+
'web_site_name': web_site_name,
15+
'web_site_slogan': web_site_slogan
1416
})
1517

1618

@@ -28,7 +30,9 @@ def contact(request):
2830
""" İletişim Sayfası """
2931
last_db = post.objects.order_by()[:3]
3032
return render(request, 'contact.html', {
31-
'last_db': last_db
33+
'last_db': last_db,
34+
'web_site_name': web_site_name,
35+
'web_site_slogan': web_site_slogan
3236
})
3337

3438

@@ -63,7 +67,9 @@ def page(request,id):
6367
'last_db': last_db,
6468
'db': db,
6569
'pages': pages,
66-
'category_db': category_db
70+
'category_db': category_db,
71+
'web_site_name': web_site_name,
72+
'web_site_slogan': web_site_slogan
6773
})
6874

6975

@@ -98,13 +104,22 @@ def category_view(request, category_names):
98104
category_db = category.objects.filter(seo_url=category_names)
99105
post_db = post.objects.filter(category_list__seo_url=category_names)
100106
pages = Paginator(post_db,5)
107+
for seo_info in category_db:
108+
title = seo_info.category_name
109+
description = seo_info.category_description
110+
keywords = seo_info.category_keywords
101111
return render(request, 'category.html', {
102112
'last_db': last_db,
103113
'category_db_list': category_db_list,
104114
'category_db': category_db,
105115
'post_db': get_list_or_404(post_db),
106116
'pages':pages,
107-
'category_names':category_names
117+
'category_names':category_names,
118+
'title': title,
119+
'description': description,
120+
'keywords': keywords,
121+
'web_site_name': web_site_name,
122+
'web_site_slogan': web_site_slogan
108123
})
109124

110125

@@ -116,6 +131,10 @@ def category_page(request, category_names,id):
116131
category_db = category.objects.filter(seo_url=category_names)
117132
post_db = post.objects.filter(category_list__seo_url=category_names)
118133
pages = Paginator(post_db,5)
134+
for seo_info in category_db:
135+
title = seo_info.category_name
136+
description = seo_info.category_description
137+
keywords = seo_info.category_keywords
119138
try:
120139
db = pages.page(id)
121140
except EmptyPage:
@@ -126,7 +145,12 @@ def category_page(request, category_names,id):
126145
'category_db': category_db,
127146
'post_db': db,
128147
'pages':pages,
129-
'category_names':category_names
148+
'category_names':category_names,
149+
'title': title,
150+
'description': description,
151+
'keywords': keywords,
152+
'web_site_name': web_site_name,
153+
'web_site_slogan': web_site_slogan
130154
})
131155

132156

templates/blog.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
{% load static %}
33

44
<!-- SEO -->
5-
{% block title %}{{ web_site_name }} | {{ web_site_slogan }}{% endblock %}
6-
{% block meta_title %}{{ web_site_name }} | {{ web_site_slogan }}{% endblock %}
5+
{% block title %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
6+
{% block meta_title %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
77
{% block description %}Ali Yaman kişisel blog sayfasıdır.{% endblock %}
88
{% block keywords %}kişisel blog,yazılımcının günlüğü,kişisel yazılar,kişisel,blog{% endblock %}
99
<!-- SEO -->
10-
{% block og_title %}{{ web_site_name }} | {{ web_site_slogan }}{% endblock %}
10+
{% block og_title %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
1111
{% block og_description %}Ali Yaman Kişisel blog hakkında kişisel bilgiler bulunmaktadır. {% endblock %}
1212
{% block og_url %}{{request.get_raw_uri}}{% endblock %}
13-
{% block og_site_name %}{{ web_site_name }} | {{ web_site_slogan }}{% endblock %}
13+
{% block og_site_name %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
1414

1515
{% block category %}
1616
<li class="dropdown">

templates/category.html

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
{% extends 'base.html' %}
22
{% load static %}
3+
4+
{% block title %}{{ title }}{% endblock %}
5+
{% block meta_title %}{{ title }}{% endblock %}
6+
{% block description %}{{ description }}{% endblock %}
7+
{% block keywords %}{{ keywords }}{% endblock %}
8+
<!-- SEO -->
9+
{% block og_title %}{{ title }}{% endblock %}
10+
{% block og_description %}{{ description }}{% endblock %}
11+
{% block og_url %}{{request.get_raw_uri}}{% endblock %}
12+
{% block og_site_name %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
13+
314
{% block category %}
415
<li class="dropdown">
516
<a href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Kategoriler <span class="caret"></span></a>
@@ -10,11 +21,6 @@
1021
</ul>
1122
</li>
1223
{% endblock %}
13-
<!-- SEO -->
14-
{% block description %}Ali Yaman hakkında bilgiler içermektedir.{% endblock %}
15-
16-
{% block keywords %}kişisel blog, blog, programlama, kişisel gelişim, bloglama, developer blog{% endblock %}
17-
1824
{% block content %}
1925
<!-- +++++ Welcome Section +++++ -->
2026
{% for i in category_db %}

templates/category_page.html

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
{% extends 'base.html' %}
22
{% load static %}
3+
4+
{% block title %}{{ title }}{% endblock %}
5+
{% block meta_title %}{{ title }}{% endblock %}
6+
{% block description %}{{ description }}{% endblock %}
7+
{% block keywords %}{{ keywords }}{% endblock %}
8+
<!-- SEO -->
9+
{% block og_title %}{{ title }}{% endblock %}
10+
{% block og_description %}{{ description }}{% endblock %}
11+
{% block og_url %}{{request.get_raw_uri}}{% endblock %}
12+
{% block og_site_name %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
13+
314
{% block category %}
415
<li class="dropdown">
516
<a href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Kategoriler <span class="caret"></span></a>
@@ -10,10 +21,6 @@
1021
</ul>
1122
</li>
1223
{% endblock %}
13-
<!-- SEO -->
14-
{% block description %}Ali Yaman hakkında bilgiler içermektedir.{% endblock %}
15-
16-
{% block keywords %}kişisel blog, blog, programlama, kişisel gelişim, bloglama, developer blog{% endblock %}
1724

1825
{% block content %}
1926
<!-- +++++ Welcome Section +++++ -->
@@ -38,7 +45,7 @@ <h3><i class="{{ i.category_icon }}" aria-hidden="true"> {{ i.category_name }}</
3845
<div class="row mt centered">
3946
{% for i in post_db %}
4047
<div class="col-lg-4">
41-
<a class="zoom green" href="/{{ i.seo_url }}"><img width="500" height="200" src="media/{{ i.image }}" alt="" /></a>
48+
<a class="zoom green" href="/{{ i.seo_url }}"><img width="500" height="200" src="/media/{{ i.image }}" alt="" /></a>
4249
<p>{{ i.title }}</p>
4350
</div>
4451
{% endfor %}

templates/contact.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
{% extends 'base.html' %}
22
{% load static %}
33

4+
{% block title %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
5+
{% block meta_title %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
6+
{% block description %}Ali Yaman kişisel iletişim sayfasıdır.{% endblock %}
7+
{% block keywords %}kişisel blog,yazılımcının günlüğü,kişisel yazılar,kişisel,blog{% endblock %}
48
<!-- SEO -->
5-
{% block description %}İletişim bilgilerim.{% endblock %}
6-
7-
{% block keywords %}kişisel blog, blog, programlama, kişisel gelişim, bloglama, developer blog{% endblock %}
9+
{% block og_title %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
10+
{% block og_description %}Ali Yaman Kişisel blog hakkında kişisel bilgiler bulunmaktadır. {% endblock %}
11+
{% block og_url %}{{request.get_raw_uri}}{% endblock %}
12+
{% block og_site_name %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
813

914
{% block content %}
1015
<!-- +++++ Contact Section +++++ -->

templates/page.html

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
{% extends 'base.html' %}
22
{% load static %}
33

4+
<!-- SEO -->
5+
{% block title %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
6+
{% block meta_title %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
7+
{% block description %}Ali Yaman kişisel blog sayfasıdır.{% endblock %}
8+
{% block keywords %}kişisel blog,yazılımcının günlüğü,kişisel yazılar,kişisel,blog{% endblock %}
9+
<!-- SEO -->
10+
{% block og_title %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
11+
{% block og_description %}Ali Yaman Kişisel blog hakkında kişisel bilgiler bulunmaktadır. {% endblock %}
12+
{% block og_url %}{{request.get_raw_uri}}{% endblock %}
13+
{% block og_site_name %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
14+
415
{% block category %}
516
<li class="dropdown">
617
<a href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Kategoriler <span class="caret"></span></a>
@@ -11,10 +22,6 @@
1122
</ul>
1223
</li>
1324
{% endblock %}
14-
<!-- SEO -->
15-
{% block description %}Yeteneklerimi ve benim hakkında daha detaylı bilgiler içermektedir.{% endblock %}
16-
17-
{% block keywords %}kişisel blog, blog, programlama, kişisel gelişim, bloglama, developer blog, ali yaman kim, ali yaman kimdir{% endblock %}
1825

1926
{% block content %}
2027

@@ -58,7 +65,7 @@ <h4 class="">Kategoriler</h4>
5865

5966
{% for i in db %}
6067
<div class="row">
61-
<div class="col-sm-4"><a href="#" class=""><img src="media/{{ i.image }}" class="img-responsive"></a>
68+
<div class="col-sm-4"><a href="#" class=""><img src="/media/{{ i.image }}" class="img-responsive"></a>
6269
</div>
6370
<div class="col-sm-8">
6471
<h3 class="title"><a href="/makale/{{ i.seo_url }}">{{ i.title }}</a></h3>

templates/profil.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@
22
{% load static %}
33

44
<!-- SEO -->
5-
{% block description %}Ali Yaman hakkında bilgiler içermektedir.{% endblock %}
5+
{% block title %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
6+
{% block meta_title %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
7+
{% block description %}Ali Yaman kişisel blog portsal sayfasıdır.{% endblock %}
8+
{% block keywords %}kişisel blog,yazılımcının günlüğü,kişisel yazılar,kişisel,blog{% endblock %}
9+
<!-- SEO -->
10+
{% block og_title %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
11+
{% block og_description %}Ali Yaman Kişisel blog hakkında kişisel bilgiler bulunmaktadır. {% endblock %}
12+
{% block og_url %}{{request.get_raw_uri}}{% endblock %}
13+
{% block og_site_name %}{{ web_site_name }} - {{ web_site_slogan }}{% endblock %}
614

7-
{% block keywords %}kişisel blog, blog, programlama, kişisel gelişim, bloglama, developer blog{% endblock %}
815

916
{% block content %}
1017
<!-- +++++ Welcome Section +++++ -->

0 commit comments

Comments
 (0)