Skip to content

Commit

Permalink
Blog list layout whitespace cleanup (#2159)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin authored Jan 8, 2025
1 parent 3aa3dc7 commit 30a6c34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ For the full list of changes, see the [0.x.y] release notes.

**Other changes**:

- Blog section index page content and title used to be ignored. They are now
displayed ([#1787]). You can recover the old behavior use the following style
- Blog section index page content and title used to be ignored, they are now
displayed ([#1787]). To recover the old behavior use the following style
override: `.td-section.td-blog .td-content { display: none; }`.

[0.x.y]: https://github.com/google/docsy/releases/latest?FIXME=v0.X.Y
Expand Down
5 changes: 2 additions & 3 deletions layouts/blog/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

<div class="td-content">
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ with .Content }}{{ . }}{{ end -}}
</div>

{{ if (and .Parent .Parent.IsHome) -}}
{{ $.Scratch.Set "blog-pages" (where .Site.RegularPages "Section" .Section) -}}
{{ else -}}
{{$.Scratch.Set "blog-pages" .Pages -}}
{{ end -}}

{{- if .Pages -}}
{{ if .Pages -}}
<div class="td-blog-posts">
{{ $pager := .Paginate (( $.Scratch.Get "blog-pages").GroupByDate "2006" ) -}}
{{ range $pager.PageGroups -}}
Expand Down

0 comments on commit 30a6c34

Please sign in to comment.