Create blog templates and set data
This commit is contained in:
parent
19d40834a6
commit
819c25e26b
@ -25,4 +25,8 @@ eleventyComputed:
|
|||||||
<article class="article">
|
<article class="article">
|
||||||
{{ content | safe }}
|
{{ content | safe }}
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
{% if tags.includes("blog pages") %}
|
||||||
|
{% include "main/blognav.njk" %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
@ -17,4 +17,8 @@ layout: main/base
|
|||||||
<div class="content {{'content--divided' if isContentDivided }}">
|
<div class="content {{'content--divided' if isContentDivided }}">
|
||||||
{{ content | safe }}
|
{{ content | safe }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if tags.includes("blog pages") %}
|
||||||
|
{% include "main/blognav.njk" %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
3
src/blog/blog.11tydata.json
Normal file
3
src/blog/blog.11tydata.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"tags": "blog pages"
|
||||||
|
}
|
11
src/blog/posts.njk
Normal file
11
src/blog/posts.njk
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
pagination:
|
||||||
|
data: collections.posts
|
||||||
|
size: 10
|
||||||
|
alias: postList
|
||||||
|
reverse: true
|
||||||
|
title: Blog Archive
|
||||||
|
layout: main/content
|
||||||
|
tags: blog pages
|
||||||
|
blogNav: Archive
|
||||||
|
---
|
4
src/blog/posts/posts.11tydata.json
Normal file
4
src/blog/posts/posts.11tydata.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"layout": "main/article",
|
||||||
|
"tags": "posts"
|
||||||
|
}
|
6
src/pages/blog.njk
Normal file
6
src/pages/blog.njk
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
layout: main/content
|
||||||
|
title: Blog
|
||||||
|
desc: Leilukin's blog.
|
||||||
|
tags: blog pages
|
||||||
|
---
|
Loading…
x
Reference in New Issue
Block a user