Browse Source

Add exclusion for posts

Posts exclude themselves from the 'Read more' section.
master
digitalcraftsman 9 years ago
parent
commit
fb298e1215
  1. 2
      layouts/partials/latest-posts.html

2
layouts/partials/latest-posts.html

@ -2,7 +2,7 @@
<h3>{{ with .Site.Params.readMore }}{{ . }}{{ else }}Read more{{ end }}</h3> <h3>{{ with .Site.Params.readMore }}{{ . }}{{ else }}Read more{{ end }}</h3>
{{ range first 10 .Site.Pages }} {{ range first 10 .Site.Pages }}
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }} {{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
{{ if ne $url "about/" }}
{{ if and (ne $url "about/") (ne $.Title .Title) }}
<li> <li>
<a href="{{ .Permalink }}">{{ .Title }}<aside class="dates">{{ .Date.Format "Jan 2" }}</aside></a> <a href="{{ .Permalink }}">{{ .Title }}<aside class="dates">{{ .Date.Format "Jan 2" }}</aside></a>
</li> </li>

Loading…
Cancel
Save