Skip to content

Commit 02a2f5c

Browse files
authored
Merge pull request #503 from OughtPuts/improve-seo-on-blog
Address SEO Changes on Blog Page
2 parents ecb8756 + 97e186a commit 02a2f5c

File tree

8 files changed

+70
-36
lines changed

8 files changed

+70
-36
lines changed

_includes/post.html

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
<div class="blog__post">
2-
<h6>{{ post.date | date: '%B %-d, %Y' }}</h6>
3-
4-
<dl>
5-
<dt><a href="{{ post.url }}">{{ post.title | strip_html }}</a></dt>
6-
<dd>{{ post.content | strip_html | truncatewords: 30 }}</dd>
7-
</dl>
8-
</div>
1+
<li class="blog__post">
2+
<div class="post-date">
3+
<p>{{ post.date | date: '%B %-d, %Y' }}</p>
4+
</div>
5+
<div class="post-container">
6+
<h3>
7+
<a href="{{ post.url }}">{{ post.title | strip_html }}</a>
8+
</h3>
9+
<p>
10+
{{ post.content | strip_html | truncatewords: 30 }}
11+
</p>
12+
</div>
13+
</li>

_pages/community.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<div class="heading__headline common-headline">
1313
<h1>We make Rails better.</h1>
1414

15-
<h4>Rails is improving every year from the work of thousands of volunteers contributing in ways big and small. Everyone can help make this framework better whether they’ve been using it since the beginning or they just started yesterday.</h4>
15+
<p>Rails is improving every year from the work of thousands of volunteers contributing in ways big and small. Everyone can help make this framework better whether they’ve been using it since the beginning or they just started yesterday.</p>
1616
</div>
1717
</div>
1818
</div>

_pages/foundation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<div class="heading__body">
1313
<div class="heading__headline common-headline">
1414
<h1>The Rails Foundation.</h1>
15-
<h4>A non-profit organization helping our ecosystem prosper.</h4>
15+
<p>A non-profit organization helping our ecosystem prosper.</p>
1616
</div>
1717
</div>
1818
</div>

_sass/common/_headline.scss

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
line-height: 34px;
3535
}
3636

37-
h4 {
37+
h4, p {
3838

3939
color: $color-black;
4040
font-size: 26px;
@@ -110,14 +110,10 @@
110110
line-height: 43px;
111111
}
112112

113-
h4 {
113+
h4, p {
114114
font-size: 39px;
115115
letter-spacing: -0.01em;
116116
line-height: 44px;
117117
}
118-
119118
}
120-
121-
122-
123119
}

_sass/modules/_blog.scss

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@
66
max-width: 1080px;
77
}
88

9+
h2 {
10+
color: $color-black;
11+
font-size: 23px;
12+
padding: 0px;
13+
font-weight: 600;
14+
line-height: 42px;
15+
}
16+
17+
span:hover h2 {
18+
color: $color-red;
19+
}
20+
921
&__posts,
1022
&__pagination {
1123
margin-left: 30px;
@@ -18,21 +30,29 @@
1830

1931
border-top: 3px solid rgba($color-black, 0.1);
2032
padding-top: 30px;
33+
display: flex;
34+
gap: 30px;
35+
2136

22-
h6 {
37+
38+
.post-date {
39+
flex: 1;
40+
41+
p {
2342
font-size: 21px;
2443
font-weight: 600;
2544
letter-spacing: -0.006em;
2645
line-height: 26px;
2746
margin-top: -7px;
47+
}
2848
}
2949

30-
dl {
31-
50+
.post-container {
51+
flex: 3;
3252
margin-bottom: -6px;
3353
margin-top: 1px;
3454

35-
dt {
55+
h3 {
3656

3757
color: $color-black;
3858
font-size: 31px;
@@ -50,10 +70,9 @@
5070
}
5171

5272
}
53-
5473
}
5574

56-
dd {
75+
p {
5776

5877
color: $color-grey-5;
5978
font-size: 21px;
@@ -105,12 +124,15 @@
105124
gap: 30px;
106125
padding-top: 40px;
107126

108-
h6 {
109-
flex: 1;
110-
margin-top: -1px;
127+
.post-date {
128+
p {
129+
flex: 1;
130+
margin-top: -1px;
131+
}
111132
}
112133

113-
dl {
134+
135+
.post-container {
114136
flex: 3;
115137
margin-top: -8px;
116138
}

_sass/modules/_heading.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
padding-bottom: 3px;
2727
}
2828

29-
h4 {
29+
h4, p {
3030
padding-top: 17px;
3131
}
3232

@@ -166,10 +166,9 @@
166166
padding-top: 4px;
167167
}
168168

169-
h4 {
169+
h4, p {
170170
padding-top: 20px;
171171
}
172-
173172
}
174173

175174
&__button {

blog/index.html

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,41 @@
44
---
55

66
<div class="heading common-padding--bottom-small common-padding--top-small">
7+
<div class="container">
8+
<div class="heading__body">
9+
<div class="heading__headline common-headline">
10+
<h1>The Rails Blog: News & Release Notes</h1>
11+
<p>Discover the latest Rails news, version releases, community updates, and feature announcements.</p>
12+
</div>
13+
</div>
14+
</div>
15+
</div>
16+
17+
<div class="blog common-padding--bottom-small">
718
<div class="container">
819
<div class="heading__body">
920
<div class="heading__headline common-headline">
1021
<div class="heading__buttons">
1122
<ul>
12-
<li><a href="/blog"><span>Everything</span></a></li>
13-
<li><a href="/category/releases"><span>Releases</span></a></li>
14-
<li><a href="/category/news"><span>News</span></a></li>
15-
<li><a href="/category/foundation"><span>Foundation</span></a></li>
23+
<li><a href="/blog"><span><h2>Everything</h2></span></a></li>
24+
<li><a href="/category/releases"><span><h2>Releases</h2></span></a></li>
25+
<li><a href="/category/news"><span><h2>News</h2></span></a></li>
26+
<li><a href="/category/foundation"><span><h2>Foundation</h2></span></a></li>
1627
</ul>
1728
</div>
1829
</div>
1930
</div>
2031
</div>
2132
</div>
2233

34+
2335
<div class="blog common-padding--bottom">
2436
<div class="container">
25-
<div class="blog__posts">
37+
<ul class="blog__posts">
2638
{% for post in paginator.posts %}
2739
{% include post.html %}
2840
{% endfor %}
29-
</div>
41+
</ul>
3042

3143
{% if paginator.next_page %}
3244
<div class="blog__pagination">

world/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div class="heading__body">
1010
<div class="heading__headline common-headline">
1111
<h1>Rails World</h1>
12-
<h4>Shaping the future of Ruby on Rails.</h4>
12+
<p>Shaping the future of Ruby on Rails.</p>
1313
</div>
1414
</div>
1515
</div>

0 commit comments

Comments
 (0)