diff options
author | holten <holten.ko@gmail.com> | 2019-11-20 12:08:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-20 12:08:55 +0300 |
commit | 0ab8090dbe836fbe6ae93984d5702d00cea30ac9 (patch) | |
tree | 2696ed0416108e69d35fce474a903cfcbbb23b68 /layouts | |
parent | 343c757c39bfe8d4d71ae80c2fd4a1fc760f3676 (diff) | |
parent | 9ee2f047cfbc5290fa75ac95b8b157f1c6ba787f (diff) |
Merge pull request #1 from xiaoheiAh/master
fix
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/list.searchindex.json | 2 | ||||
-rw-r--r-- | layouts/partials/_widgets/recent_posts.html | 4 | ||||
-rw-r--r-- | layouts/partials/script.html | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/layouts/_default/list.searchindex.json b/layouts/_default/list.searchindex.json index 28ddbf6..4e93e79 100644 --- a/layouts/_default/list.searchindex.json +++ b/layouts/_default/list.searchindex.json @@ -7,7 +7,7 @@ {{- $.Scratch.Add "tags" (dict "title" .Page.Title "uri" .Page.Permalink) -}} {{- end -}} {{- $.Scratch.Add "posts" slice -}} -{{- range $index, $element := (where .Site.Pages "Type" "posts") -}} +{{- range $index, $element := (where .Site.RegularPages "Type" "posts") -}} {{- $.Scratch.Add "posts" (dict "id" $index "title" $element.Title "uri" $element.Permalink "tags" $element.Params.tags "section" $element.Section "content" $element.Plain "summary" $element.Summary "year" ($element.Date.Format "2006")) -}} {{- end -}} {{- $.Scratch.SetInMap "searchindex" "posts" ($.Scratch.Get "posts") }} diff --git a/layouts/partials/_widgets/recent_posts.html b/layouts/partials/_widgets/recent_posts.html index 631767a..4546d8c 100644 --- a/layouts/partials/_widgets/recent_posts.html +++ b/layouts/partials/_widgets/recent_posts.html @@ -1,9 +1,9 @@ -{{- if $.Pages }} +{{- if $.Site.RegularPages }} <div class="widget"> <h3 class="widget-title">{{T "widget_recent_posts" }}</h3> <div class="widget-body"> <ul class="recent-post-list list-unstyled no-thumbnail"> - {{- range first 5 (where $.Pages "Section" "posts") }} + {{- range first 5 (where $.Site.RegularPages "Type" "posts") }} <li> <div class="item-inner"> <p class="item-title"> diff --git a/layouts/partials/script.html b/layouts/partials/script.html index 0db3d33..5308bc2 100644 --- a/layouts/partials/script.html +++ b/layouts/partials/script.html @@ -44,4 +44,4 @@ hljs.initHighlightingOnLoad(); {{- partial "_script/comment.html" . }} {{- end }} {{- partial "_script/fancybox.html" . }} -{{- partial "_script/analytics.html" . }}
\ No newline at end of file +{{- partial "_script/analytics.html" . }} |