Skip to content

Commit

Permalink
Added code for Issue 31 - Remove Post Dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
ansin218 committed Oct 1, 2019
1 parent acadf22 commit 3805e9e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/post-list-term.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ $pages := ((where .Site.Pages "Type" "post") | shuffle) }}
{{ range first 3 $pages}}
{{ $pages := (.Site.RegularPages | shuffle) }}
{{ range first 6 $pages}}

<article class="post-card post">
{{if .Params.image}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/post-list.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "post") }}
{{ $paginator := .Paginate .Site.RegularPages }}
{{ range $paginator.Pages }}

<article class="post-card post">
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/readnext-random-sori.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ $posts := (where .Site.RegularPages "Section" "==" "post") }}{{ $postCount := len $posts }}{{if ge $postCount 4}}{{ $currentPage := . }}
{{ $posts := .Site.RegularPages }}{{ $postCount := len $posts }}{{if ge $postCount 4}}{{ $currentPage := . }}
<article class="read-next-card" {{if .Site.Params.cover}}
style="background-image: url({{.Site.Params.cover | absURL}});" {{else}}style="background-color: #090a0b;"{{end}}>
<header class="read-next-card-header">
Expand Down

2 comments on commit 3805e9e

@ErikBlomquist
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, it worked.

@naujoel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, it worked for me too.

Please sign in to comment.