Skip to content

Commit 126cded

Browse files
author
Paul Robert Lloyd
committed
Update documentation to reflect changes in v2.0.0
If I understand the changes correctly, we should use `page.date` on date-based archives pages, as `page.title` will return `nil`.
1 parent 9705968 commit 126cded

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/layouts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This attribute contains a simple string indicating the type of the layout being
3131

3232
#### Year layout
3333
```html
34-
<h1>Archive of posts from {{ page.title | date: "%Y" }}</h1>
34+
<h1>Archive of posts from {{ page.date | date: "%Y" }}</h1>
3535

3636
<ul class="posts">
3737
{% for post in page.posts %}
@@ -45,7 +45,7 @@ This attribute contains a simple string indicating the type of the layout being
4545

4646
#### Month layout
4747
```html
48-
<h1>Archive of posts from {{ page.title | date: "%B %Y" }}</h1>
48+
<h1>Archive of posts from {{ page.date | date: "%B %Y" }}</h1>
4949

5050
<ul class="posts">
5151
{% for post in page.posts %}
@@ -59,7 +59,7 @@ This attribute contains a simple string indicating the type of the layout being
5959

6060
#### Day layout
6161
```html
62-
<h1>Archive of posts from {{ page.title | date: "%B %-d, %Y" }}</h1>
62+
<h1>Archive of posts from {{ page.date | date: "%B %-d, %Y" }}</h1>
6363

6464
<ul class="posts">
6565
{% for post in page.posts %}

0 commit comments

Comments
 (0)