mirror of
https://github.com/helenclx/leilukin-site.git
synced 2025-04-04 13:52:42 +00:00
Create blog templates and set data
This commit is contained in:
parent
19d40834a6
commit
819c25e26b
@ -25,4 +25,8 @@ eleventyComputed:
|
||||
<article class="article">
|
||||
{{ content | safe }}
|
||||
</article>
|
||||
|
||||
{% if tags.includes("blog pages") %}
|
||||
{% include "main/blognav.njk" %}
|
||||
{% endif %}
|
||||
</div>
|
@ -17,4 +17,8 @@ layout: main/base
|
||||
<div class="content {{'content--divided' if isContentDivided }}">
|
||||
{{ content | safe }}
|
||||
</div>
|
||||
|
||||
{% if tags.includes("blog pages") %}
|
||||
{% include "main/blognav.njk" %}
|
||||
{% endif %}
|
||||
</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