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