hextra icon indicating copy to clipboard operation
hextra copied to clipboard

Show "summary" and "last modified" under the title at the top of the page

Open trwnh opened this issue 1 year ago • 2 comments

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

trwnh avatar May 05 '24 09:05 trwnh

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 subtitle to summary if that is more suitable.
  • I use the featuredImage parameter for the image to distinct the one I need to be featured. You can skip it.

Here is what it looks like.

mafendi avatar May 05 '24 10:05 mafendi

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.

mafendi avatar May 05 '24 10:05 mafendi