diff options
| author | Francesco <tomaselli.fr@gmail.com> | 2025-05-16 19:34:51 +0200 | 
|---|---|---|
| committer | Francesco <tomaselli.fr@gmail.com> | 2025-05-16 19:34:51 +0200 | 
| commit | ab3d2d785758aebf0da5a59c3aed6a172a71f59d (patch) | |
| tree | b36dcf9b7ab9e4633be6cc7b8b7159f930ed04a6 /layouts/_default/single.html | |
| parent | 02934adef1e55ad9ce16f9eba62d96f69a39e401 (diff) | |
Add author rendering
Diffstat (limited to 'layouts/_default/single.html')
| -rw-r--r-- | layouts/_default/single.html | 40 | 
1 files changed, 25 insertions, 15 deletions
| diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 209524e..01c35c2 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -15,21 +15,31 @@          {{- with .Param "summary" }}          <p class="single-summary">{{ . | markdownify }}</p>          {{- end }} -     -        {{- /* Reading Time */}} -     -        <p class="single-readtime"> -        {{- with .Date }} -          {{- $dateMachine := . | time.Format "2006-01-02T15:04:05-07:00" }} -          {{- $dateHuman := . | time.Format (default ":date_long" $.Site.Params.singleDateFormat) }} -          <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time> -        {{- end }} -     -        {{- if .Param "readTime" }} -            ·   -          {{- .ReadingTime }} min read -        {{- end }} -        </p> +    +        {{- /* Date, Reading Time and Author */}} +        <div class="single-subsummary"> +          {{ with $.Param "authorAvatarPath" }} +            <img src="{{ . }}" alt="Author Avatar" /> +          {{ end }} +          <div> +            {{ with .Param "author" }} +            <p class="author"> {{- .}} </p> +            {{ end }} +            <p class="single-date"> +            {{- with .Date }} +              {{- $dateMachine := . | time.Format "2006-01-02T15:04:05-07:00" }} +              {{- $dateHuman := . | time.Format (default ":date_long" $.Site.Params.singleDateFormat) }} +              <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time> +            {{- end }} +         +            {{- if .Param "readTime" }} +                ·   +              {{- .ReadingTime }} min read +            {{- end }} +            </p> +          </div> +        </div> +              </header>      {{- if .Param "showTags" }} | 
