提交 ca9d870f 编写于 作者: F freesky-edward

bug-fixing: events and news show the same content

上级 a17b1bd3
......@@ -3,20 +3,22 @@
<div class="events active">
<h2>
Upcoming Events
<a href="#">
<a href="/events.html">
<p>more ></p>
</a>
</h2>
<ul>
{{ $posts := .Paginate (where .Data.Pages "Type" "events") }}
{{ range first 4 $posts.Pages }}
{{ $events := .Paginate (where .Data.Pages "Type" "events") }}
{{ range first 2 $events.Pages }}
<li>
<h6>
<span>EVENTS</span> <i>|</i> <span>{{ .Date.Format .Site.Params.date_format }}</span>
</h6>
<p>{{ .Title }}</p>
<a href="{{ .URL }}">
<p>{{ .Title }}</p>
</a>
</li>
{{ end }}
</ul>
......
......@@ -10,8 +10,8 @@
</h2>
<ul>
{{ $posts := .Paginate (where .Data.Pages "Type" "news") }}
{{ range first 4 $posts.Pages }}
{{ $posts := where .Data.Pages "Type" "news" }}
{{ range first 4 $posts }}
<li>
<h6>
......@@ -26,4 +26,4 @@
</div>
{{ end }}
{{ end }}
\ No newline at end of file
{{ end }}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册