mirror of
https://github.com/lmika/postlist-for-micro.blog.git
synced 2025-08-03 08:16:09 +00:00
Compare commits
No commits in common. "main" and "v1.1.0" have entirely different histories.
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +0,0 @@
|
||||||
.DS_Store
|
|
|
@ -18,53 +18,14 @@
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if (ne (.Get "limit") "") -}}
|
<ul class="postlist">
|
||||||
{{- $pgr = $pgr.Limit (int (.Get "limit")) -}}
|
{{ range $pgr }}
|
||||||
{{- end -}}
|
{{- if (ne .LinkTitle "") -}}
|
||||||
|
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||||
{{- if (eq (.Get "display") "content") -}}
|
{{- else if (ne .Summary "") -}}
|
||||||
{{ if templates.Exists "partials/_postlist/post-content-before.html" }}
|
<li><a href="{{ .RelPermalink }}">{{ .Summary | safeHTML | truncate 70 }}</a></li>
|
||||||
{{ partial "_postlist/post-content-before.html" $pgr }}
|
|
||||||
{{ end }}
|
|
||||||
<div class="postlist postlist-display-content h-feed">
|
|
||||||
{{ range $pgr }}
|
|
||||||
{{ if templates.Exists "partials/_postlist/post-content.html" }}
|
|
||||||
{{ partial "_postlist/post-content.html" . }}
|
|
||||||
{{ else }}
|
|
||||||
<div class="h-entry">
|
|
||||||
{{ if .Title }}
|
|
||||||
<h2 class="p-name"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
|
||||||
{{ if .Params.custom_summary }}
|
|
||||||
<div class="p-summary">
|
|
||||||
<p>{{ .Summary | safeHTML }}<p>
|
|
||||||
</div>
|
|
||||||
{{ else }}
|
|
||||||
<div class="e-content">
|
|
||||||
{{ .Content }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
{{ else }}
|
|
||||||
<div class="e-content">
|
|
||||||
{{ .Content }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
{{ if templates.Exists "partials/_postlist/post-content-after.html" }}
|
|
||||||
{{ partial "_postlist/post-content-after.html" $pgr }}
|
|
||||||
{{ end }}
|
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<ul class="postlist">
|
<li><a href="{{ .RelPermalink }}">{{ .Content | safeHTML | truncate 70 }}</a></li>
|
||||||
{{ range $pgr }}
|
{{ end }}
|
||||||
{{- if (ne .LinkTitle "") -}}
|
{{ end }}
|
||||||
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
</ul>
|
||||||
{{- else if (ne .Summary "") -}}
|
|
||||||
<li><a href="{{ .RelPermalink }}">{{ .Summary | safeHTML | truncate 70 }}</a></li>
|
|
||||||
{{- else -}}
|
|
||||||
<li><a href="{{ .RelPermalink }}">{{ .Content | safeHTML | truncate 70 }}</a></li>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
|
||||||
{{- end -}}
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.2.0",
|
"version": "1.1.0",
|
||||||
"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