Skip to content

Commit

Permalink
Blog list layout: display the page title and content
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Jan 7, 2025
1 parent 6c22754 commit 15c62ef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ 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
override: `.td-section.td-blog .td-content { display: none; }`.

[0.x.y]: https://github.com/google/docsy/releases/latest?FIXME=v0.X.Y
[#1787]: https://github.com/google/docsy/issues/1787

## 0.11.0

Expand Down
5 changes: 5 additions & 0 deletions layouts/blog/list.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{{ define "main" -}}

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

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

0 comments on commit 15c62ef

Please sign in to comment.