You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear @vaga ,
Appreciate if you can enable a way to display the Front Matter "Description" under the title, so I can display a brief about an article .
Thank you so much for the theme, its perfect :) .
Amr
The text was updated successfully, but these errors were encountered:
@amrelhusseiny, you can do this by having a file called single.html in /layouts/_defaults/ with the following:
{{ define "main" }}
<articleclass="post"><headerclass="post-header"><h1class ="post-title">{{ .Title }}</h1><h3style="color:gray">{{ .Description }}</h3>
{{- if ne .Type "page" }}
<divclass="post-meta"><div>
{{ partial "icon.html" (dict "ctx" $ "name" "calendar") }}
{{ .PublishDate.Format "Jan 2, 2006" }}
</div><div>
{{ partial "icon.html" (dict "ctx" $ "name" "clock") }}
{{ .ReadingTime }} min read
</div>
{{- with .Params.tags }}
<div>
{{ partial "icon.html" (dict "ctx" $ "name" "tag") }}
{{- range . -}}
{{ with $.Site.GetPage (printf "/%s/%s" "tags" . ) }}
<aclass="tag" href="{{ .Permalink }}">{{ .Title }}</a>
{{- end }}
{{- end }}
</div>
{{- end }}
</div>
{{- end }}
</header><divclass="post-content">
{{ .Content }}
</div><divclass="post-footer">
{{ template "_internal/disqus.html" . }}
</div></article>
{{ end }}
Explaination
the theme doesn't really support this feature as of now, however you can change the code as per your liking. The single.html controls the blog pages so adding the <h3 style="color:gray">{{ .Description }}</h3> after the title (after line 4) would display the description from the blogs' frontmatter.
Dear @vaga ,
Appreciate if you can enable a way to display the Front Matter "Description" under the title, so I can display a brief about an article .
Thank you so much for the theme, its perfect :) .
Amr
The text was updated successfully, but these errors were encountered: