Browse Source

replace Permalink to RelPermalink

weichen 3 years ago
parent
commit
727ffbc9d9

+ 3 - 3
themes/hugo-lamp/layouts/blog/list.html

@@ -17,7 +17,7 @@
             {{ range $paginator.Pages }}
             <div class="mb-5 post">
                 <div class="mb-4">
-                    <a href="{{ .Permalink }}">
+                    <a href="{{ .RelPermalink }}">
                         <amp-img
                             alt="{{ .Title }}"
                             src="{{ .Params.Image | relURL }}"
@@ -27,13 +27,13 @@
                         </amp-img>
                     </a>
                 </div>
-                <a href="{{ .Permalink }}" style="color:#444444;">
+                <a href="{{ .RelPermalink }}" style="color:#444444;">
                     <div class="title-size"><b>{{ .Title }}</b></div>
                 </a>
                 <p class="blog-content" style="font-size:0.8rem;">{{ .PublishDate.Format "January 2, 2006" }}</p>
                 <div class="blog-content">
                     <p class="card-text" style="color:#4D4D4D;">{{ .Summary }}</p>
-                    <a href="{{ .Permalink }}" class="btn btn-light">繼續閱讀</a>
+                    <a href="{{ .RelPermalink }}" class="btn btn-light">繼續閱讀</a>
                 </div>
             </div>
 

+ 2 - 2
themes/hugo-lamp/layouts/collection/list.html

@@ -215,7 +215,7 @@
                         {{ range $paginator.Pages }}
                         <div class="col">                
                             <div class="card h-100">
-                                <a href="{{ .Permalink }}" style="color:#444444;">
+                                <a href="{{ .RelPermalink }}" style="color:#444444;">
                                     <amp-img
                                         alt="{{ .Title }}"
                                         src="{{ .Params.Image | relURL }}"
@@ -225,7 +225,7 @@
                                     </amp-img>
                                 </a>
                                 <div class="card-body">
-                                    <a href="{{ .Permalink }}" style="color:#444444;">
+                                    <a href="{{ .RelPermalink }}" style="color:#444444;">
                                         <div class="title-size"><b>{{ .Title }}</b></div>
                                     </a>
                                     <p class="card-text" style="color:#4D4D4D;">{{ .Description }}</p>