Bladeren bron
[Feat] Created ability to create standalone posts that do not display date.
This behaviour is now managed by a single partial template rather than hardcoding.
main
bovenliggende
commit
91f8dc62c1
Geen bekende sleutel gevonden voor deze handtekening in de database
4 gewijzigde bestanden met
toevoegingen van 18 en
12 verwijderingen
-
layouts/_default/list.html
-
layouts/_default/single.html
-
layouts/index.html
-
layouts/partials/listing.html
|
|
@@ -11,11 +11,7 @@ |
|
|
|
|
|
|
|
<!-- orders content according to the "publishdate" field in front matter --> |
|
|
|
{{ range .Pages.ByPublishDate }} |
|
|
|
<div> |
|
|
|
<a href="{{ .Permalink }}">{{ .Title }}</a><br /> |
|
|
|
<time>{{ .Date.Format "January 2, 2006" }}</time> |
|
|
|
</div> |
|
|
|
<br /> |
|
|
|
{{ partial "listing.html" . }} |
|
|
|
{{ end }} |
|
|
|
</div> |
|
|
|
</body> |
|
|
@@ -4,8 +4,10 @@ |
|
|
|
<html> |
|
|
|
{{ partial "page_header.html" . }} |
|
|
|
<h1>{{ .Title }}</h1> |
|
|
|
<p class="post-meta"><time itemprop="datePublished">{{ .Date.Format "January 2, 2006" }}</time> |
|
|
|
</p> |
|
|
|
{{ if ne .Params.Standalone true }} |
|
|
|
<p class="post-meta"><time itemprop="datePublished">{{ .Date.Format "January 2, 2006" }}</time></p> |
|
|
|
{{ end }} |
|
|
|
|
|
|
|
{{ .Content }} |
|
|
|
|
|
|
|
{{ partial "footer.html" . }} |
|
|
@@ -32,11 +32,8 @@ |
|
|
|
|
|
|
|
<!-- orders content according to the "publishdate" field in front matter --> |
|
|
|
{{ range first .Site.Data.personalize.PostLimit .Pages.ByPublishDate }} |
|
|
|
<div> |
|
|
|
<a href="{{ .Permalink }}">{{ .Title }}</a><br /> |
|
|
|
<time>{{ .Date.Format "January 2, 2006" }}</time> |
|
|
|
</div> |
|
|
|
<br /> |
|
|
|
<!-- TODO: Make consistent with other list pages --> |
|
|
|
{{ partial "listing.html" . }} |
|
|
|
{{ end }} |
|
|
|
|
|
|
|
|
|
|
@@ -0,0 +1,11 @@ |
|
|
|
<!-- Single listing in list of posts. Used in index and list pages. --> |
|
|
|
|
|
|
|
|
|
|
|
<!-- If type is page, not a blog post, class as a unique page with no date. Do not show in listings --> |
|
|
|
{{ if ne .Params.Standalone true }} |
|
|
|
<div> |
|
|
|
<a href="{{ .Permalink }}">{{ .Title }}</a><br /> |
|
|
|
<time>{{ .Date.Format "January 2, 2006" }}</time> |
|
|
|
</div> |
|
|
|
<br /> |
|
|
|
{{ end }} |