Skip to content

Commit e4261cc

Browse files
authored
Feat/style and publish front matter summary in article (#402)
* feat: enable summaries in list pages * feat: publish front matter summary in articles * blog: add front matter summary to article as demo
1 parent 039830c commit e4261cc

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

assets/css/custom.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,9 @@
1919
li {
2020
line-height: 1.65;
2121
}
22+
23+
.article-summary {
24+
font-style: italic;
25+
padding-left: 10px;
26+
border-left: 4px solid #e7352c;
27+
}

config/_default/params.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ smartTOCHideUnfocusedChildren = false
8787
layoutBackgroundBlur = true # only used when heroStyle equals background
8888
layoutBackgroundHeaderSpace = false
8989
showBreadcrumbs = false
90-
showSummary = false
90+
showSummary = true
9191
showViews = true
9292
showLikes = true
9393
showTableOfContents = true

content/blog/meet-espressif-developer-portal/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ showAuthor: false
55
featureAsset: "img/featured/featured-espressif.webp"
66
authors:
77
- "kirill-chalov"
8+
summary: "This article introduces the Espressif Developer Portal, discusses its purpose, the expected content, and how we--the community---can contribute and collaborate."
9+
tags: ["Espressif", "News", "Announcement", "Community", "Contribute"]
810
---
911

10-
This post covers the following:
12+
We will explore the following topics:
1113

1214
- [Motives](#motives) for creating the portal
1315
- [Goals](#goals) to be achieved with the portal

layouts/_default/single.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ <h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
7474

7575
<div class="min-w-0 min-h-0 max-w-fit">
7676

77+
{{ if .Params.summary }}
78+
<div class="article-summary max-w-prose mb-30">
79+
{{ .Summary | emojify }}
80+
</div>
81+
{{ end }}
82+
7783
<div class="article-content max-w-prose mb-20">
7884
{{ .Content | emojify }}
7985
</div>

0 commit comments

Comments
 (0)