mirror of
https://github.com/lmika/postlist-for-micro.blog.git
synced 2026-01-08 12:05:32 +00:00
Compare commits
3 commits
1f3a89a05a
...
216ab5a957
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
216ab5a957 | ||
|
|
e0746ea042 | ||
|
|
e253038e4d |
|
|
@ -3,6 +3,7 @@
|
|||
{{- $parOrder := or (and .Params (.Get "order")) "" -}}
|
||||
{{- $parLimit := or (and .Params (.Get "limit")) "" -}}
|
||||
{{- $parDisplay := or (and .Params (.Get "display")) "" -}}
|
||||
{{- $parContentOptions := split (or (and .Params (.Get "content-options")) "") " " -}}
|
||||
|
||||
{{- $pgr := where .Site.RegularPages "Section" "ne" "" -}}
|
||||
{{- $pgr = where $pgr "Section" "not in" (slice "replies") -}}
|
||||
|
|
@ -33,6 +34,8 @@
|
|||
{{- $pgr = $pgr.Limit (int $parLimit) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $showSummary := not (in $parContentOptions "no-summary") -}}
|
||||
|
||||
{{- if (eq $parDisplay "content") -}}
|
||||
{{ if templates.Exists "partials/_postlist/post-content-before.html" }}
|
||||
{{ partial "_postlist/post-content-before.html" $pgr }}
|
||||
|
|
@ -45,7 +48,7 @@
|
|||
<div class="h-entry">
|
||||
{{ if .Title }}
|
||||
<h2 class="p-name"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||
{{ if .Params.custom_summary }}
|
||||
{{ if and $showSummary .Params.custom_summary }}
|
||||
<div class="p-summary">
|
||||
<p>{{ .Summary | safeHTML }}<p>
|
||||
</div>
|
||||
|
|
@ -71,7 +74,7 @@
|
|||
{{ range $pgr }}
|
||||
{{- if (ne .LinkTitle "") -}}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{- else if (ne .Summary "") -}}
|
||||
{{- else if and $showSummary (ne .Summary "") -}}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Summary | safeHTML | truncate 70 }}</a></li>
|
||||
{{- else -}}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Content | safeHTML | truncate 70 }}</a></li>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "1.3.1",
|
||||
"version": "1.4.0",
|
||||
"title": "Postlist",
|
||||
"description": "Shortcode for dynamically adding a list of posts",
|
||||
"includes": [
|
||||
|
|
|
|||
Loading…
Reference in a new issue