added option to hide article summary

This commit is contained in:
Gabriele Musco 2021-06-09 20:54:12 +02:00
parent 0db4bc7953
commit 5ee2f2a18b
No known key found for this signature in database
GPG Key ID: 8539FD3454380B83
2 changed files with 7 additions and 4 deletions

View File

@ -47,6 +47,7 @@ summaryLength = 70 # number of words for article summaries
showRss = true # show the link for the RSS feed; default true
imageInArticlePreview = false # show images in article preview; default false
articleSummary = true # show a summary in article preview; default true
navtype = "standard" # changes the style of the pagination, available styles are: "standard", "circles"
fontFamily = "JetBrains Mono" # changes the font, default "JetBrains Mono"

View File

@ -19,10 +19,12 @@
<img src="{{ .Params.Image }}" />
{{ end }}
{{end}}
<div class="articlePreview">
<p>{{ .Summary }}</p>
<p><a href="{{ .Permalink }}">Continue reading </a></p>
</div>
{{ if (site.Params.articleSummary | default true) }}
<div class="articlePreview">
<p>{{ .Summary }}</p>
<p><a href="{{ .Permalink }}">Continue reading </a></p>
</div>
{{ end }}
</div>
<hr />
</article>