فهرست منبع

Replace isset with with

Zachary Betz 6 سال پیش
والد
کامیت
dd93ff9031
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      layouts/post/single.html

+ 3 - 3
layouts/post/single.html

@@ -10,16 +10,16 @@
       {{ $dateFormat := $.Site.Params.dateFormat | default "Jan 2, 2006" }}
       {{ $dateFormat := $.Site.Params.dateFormat | default "Jan 2, 2006" }}
       <strong aria-hidden="true">Publish date: </strong>{{ .PublishDate.Format $dateFormat }}
       <strong aria-hidden="true">Publish date: </strong>{{ .PublishDate.Format $dateFormat }}
     </div>
     </div>
-    {{ if isset .Params "tags" }}
+    {{ with .Params.tags }}
       <div class="tags">
       <div class="tags">
         <strong aria-hidden="true">Tags: </strong>
         <strong aria-hidden="true">Tags: </strong>
         <ul aria-label="tags">
         <ul aria-label="tags">
-          {{ range .Params.tags }}
+          {{ range . }}
             <li>
             <li>
               <svg class="tag-icon" aria-hidden="true" viewBox="0 0 177.16535 177.16535" focusable="false">
               <svg class="tag-icon" aria-hidden="true" viewBox="0 0 177.16535 177.16535" focusable="false">
                 <use xlink:href="#tag"></use>
                 <use xlink:href="#tag"></use>
               </svg>
               </svg>
-              <a href="{{ "/tags/" | absLangURL }}{{ . | urlize }}">{{ . }}</a>
+              <a href="{{ "tags/" | absLangURL }}{{ . | urlize }}">{{ . }}</a>
             </li>
             </li>
           {{ end }}
           {{ end }}
         </ul>
         </ul>