Skip to content

Commit

Permalink
fix: do not show non-manual splitting summary
Browse files Browse the repository at this point in the history
Closed #701
  • Loading branch information
razonyang committed Sep 12, 2022
1 parent aa1a5e9 commit c470373
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/post/content.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="post-content mb-3" data-bs-spy="scroll" data-bs-target="#TableOfContents" tabindex="0">
{{- if default false $.Site.Params.post.readMoreFromContent }}
{{- with .Summary }}<div id="post-summary">{{ . }}</div>{{ end }}
{{- if and .Summary (default false $.Site.Params.post.readMoreFromContent) (hasPrefix .Content .Summary) }}
<div id="post-summary">{{ .Summary }}</div>
<div id="post-content-body">{{- strings.TrimPrefix .Summary .Content | safeHTML -}}</div>
{{- else }}
<div id="post-content-body">{{ .Content }}</div>
Expand Down

0 comments on commit c470373

Please sign in to comment.