mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-08-10 09:21:36 -05:00
Remove description-or-summary partial and just use .Summary
I think this may have changed in Hugo's history, but now description and summary are considered different things. The description is what goes in metadata (and what search engines see), while the summary is the blurb about the article that should be displayed when rendering a summary (what I should've been using always here).
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
{{ with .Description }}
|
||||
<p>{{ . | markdownify }}</p>
|
||||
{{ else }}
|
||||
{{ with .Summary }}
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
@@ -5,9 +5,11 @@
|
||||
|
||||
{{ partial "page-metadata/author.html" . }}
|
||||
|
||||
<div class="page-description">
|
||||
{{ partial "description-or-summary.html" . }}
|
||||
</div>
|
||||
{{ with .Summary }}
|
||||
<div class="page-description">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="readmore">
|
||||
<a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a>
|
||||
|
@@ -5,8 +5,10 @@
|
||||
{{ .Title | markdownify }}
|
||||
</h2>
|
||||
|
||||
{{ with .Summary }}
|
||||
<div class="section-description">
|
||||
{{ partial "description-or-summary.html" . }}
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</a>
|
||||
|
@@ -6,9 +6,11 @@
|
||||
|
||||
{{ partial "page-metadata/series.html" . }}
|
||||
|
||||
<div class="page-description">
|
||||
{{ partial "description-or-summary.html" . }}
|
||||
</div>
|
||||
{{ with .Summary }}
|
||||
<div class="page-description">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="page-list series-inner">
|
||||
{{ range .Data.Pages.Reverse }}
|
||||
|
@@ -8,9 +8,11 @@
|
||||
|
||||
{{ partial "feature-figure.html" . }}
|
||||
|
||||
<div class="page-description">
|
||||
{{ partial "description-or-summary.html" . }}
|
||||
</div>
|
||||
{{ with .Summary }}
|
||||
<div class="page-description">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="readmore">
|
||||
<a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a>
|
||||
|
@@ -28,7 +28,7 @@
|
||||
</a>
|
||||
{{ partial "page-metadata/taxonomy.html" . }}
|
||||
</div>
|
||||
{{ partial "description-or-summary.html" . }}
|
||||
{{ .Summary }}
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user