mirror of https://github.com/lxndrblz/anatole.git

Markus Bilz
23 hours ago a5cb66ff0c3d5c2c86f89c2d9407102341bf83c8
Merge pull request #610 from lxndrblz/jules-6727677908916898601-784af47d

🧹 Refactor discouraged isset usage in Hugo templates
3 files modified
6 ■■■■■ changed files
layouts/_default/list.html 2 ●●●●● patch | view | raw | blame | history
layouts/_default/single.html 2 ●●●●● patch | view | raw | blame | history
layouts/index.html 2 ●●●●● patch | view | raw | blame | history
layouts/_default/list.html
@@ -17,7 +17,7 @@
              <a class="archive__list-title" href="{{ .RelPermalink }}" title="{{ .Title }}">{{ upper .Title }}</a>
            {{ end }}
            <div class="archive__list-date">
              {{ if isset .Site.Params "listdateformat" }}
              {{ if .Site.Params.listDateFormat }}
                {{ if .Site.Params.localizedDates }}
                  {{ time.Format .Site.Params.listDateFormat .Date }}
                {{ else }}
layouts/_default/single.html
@@ -22,7 +22,7 @@
          <li class="post__meta-item">
            <em class="fas fa-calendar-day post__meta-icon"></em>
            <span class="post__meta-text"
              >{{ if isset .Site.Params "singledateformat" }}
              >{{ if .Site.Params.singleDateFormat }}
                {{ if .Site.Params.localizedDates }}
                  {{ time.Format .Site.Params.singleDateFormat .Date }}
                {{ else }}
layouts/index.html
@@ -69,7 +69,7 @@
      <div class="post__footer">
        <em class="fas fa-calendar-day"></em>
        <span class="post__footer-date"
          >{{ if isset .Site.Params "indexdateformat" }}
          >{{ if .Site.Params.indexDateFormat }}
            {{ if .Site.Params.localizedDates }}
              {{ time.Format .Site.Params.indexDateFormat .Date }}
            {{ else }}