Browse Source

Excluded about page from post lists

master
digitalcraftsman 9 years ago
parent
commit
1708b42dc9
  1. 9
      layouts/_default/single.html
  2. 11
      layouts/partials/post-list.html

9
layouts/_default/single.html

@ -32,9 +32,12 @@
<ul id="post-list" class="archive readmore">
<h3>Read more</h3>
{{ range first 10 .Site.Pages }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}<aside class="dates">{{ .Date.Format "Jan 2" }}</aside></a>
</li>
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
{{ if ne $url "about/" }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}<aside class="dates">{{ .Date.Format "Jan 2" }}</aside></a>
</li>
{{ end }}
{{ end }}
</ul>

11
layouts/partials/post-list.html

@ -1,8 +1,11 @@
<ul id="post-list">
{{ range .Paginator.Pages }}
<li>
<a href='{{ .Permalink }}'><aside class="dates">{{ .Date.Format "Jan 2" }}</aside></a>
<a href='{{ .Permalink }}'>{{ .Title }} <h2>{{ .Description }}</h2></a>
</li>
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
{{ if ne $url "about/" }}
<li>
<a href='{{ .Permalink }}'><aside class="dates">{{ .Date.Format "Jan 2" }}</aside></a>
<a href='{{ .Permalink }}'>{{ .Title }} <h2>{{ .Description }}</h2></a>
</li>
{{ end }}
{{ end }}
</ul>
Loading…
Cancel
Save