hextra
hextra copied to clipboard
Show "summary" and "last modified" under the title at the top of the page
Feature Description
Show "summary" and "last modified" under the title at the top of the page
Problem/Solution
Right now this information is not shown
You can add summary or subtitle to the frontmatter and add similar code to the single layout:
<div class="content mt--12">
<div class="text-xl mb-6 text-justify">{{ .Params.subtitle }}</div>
<img src="{{ .Params.featuredImage | absURL }}" alt="{{ .Title }}" title="{{ .Title }}" width="100%" loading="lazy">
- Change CSS according to your design.
- Change
subtitletosummaryif that is more suitable. - I use the
featuredImageparameter for the image to distinct the one I need to be featured. You can skip it.
Here is what it looks like.
For the last updated section, you just need move this
{{ partial "components/last-updated.html" . }}
to the top of your page + change CSS according to your design.