Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
trwnh opened this issue May 5, 2024 · 2 comments
Open

Comments

@trwnh
Copy link

trwnh commented May 5, 2024

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

@mafendi
Copy link
Contributor

mafendi commented May 5, 2024

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
Copy link
Contributor

mafendi commented May 5, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants