Create blog directory
This commit is contained in:
parent
16ec41716b
commit
012fedaaa1
6
content/blog/_index.md
Normal file
6
content/blog/_index.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
+++
|
||||||
|
title = "List of blog posts"
|
||||||
|
sort_by = "date"
|
||||||
|
template = "blog.html"
|
||||||
|
page_template = "blog-page.html"
|
||||||
|
+++
|
6
content/blog/first.md
Normal file
6
content/blog/first.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
+++
|
||||||
|
title = "My first post"
|
||||||
|
date = "2021-11-20"
|
||||||
|
+++
|
||||||
|
|
||||||
|
This is my first blog post.
|
|
@ -17,7 +17,7 @@
|
||||||
{% block content %} {% endblock %}
|
{% block content %} {% endblock %}
|
||||||
<hr>
|
<hr>
|
||||||
<div style="text-align: center">
|
<div style="text-align: center">
|
||||||
<a href="/">home</a> - <a href="/projects/">projects</a> - built with <a href="https://www.getzola.org/">zola</a>
|
<a href="/">home</a> - <a href="/projects/">projects</a> - <a href="/blog/">blog</a> - built with <a href="https://www.getzola.org/">zola</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
13
templates/blog-page.html
Normal file
13
templates/blog-page.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>
|
||||||
|
{{ page.title }}
|
||||||
|
</h1>
|
||||||
|
<p>
|
||||||
|
<strong>
|
||||||
|
{{ page.date }}
|
||||||
|
</strong>
|
||||||
|
</p>
|
||||||
|
{{ page.content | safe }}
|
||||||
|
{% endblock content %}
|
12
templates/blog.html
Normal file
12
templates/blog.html
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>
|
||||||
|
{{ section.title }}
|
||||||
|
</h1>
|
||||||
|
<ul>
|
||||||
|
{% for page in section.pages %}
|
||||||
|
<li><a href="{{ page.permalink | safe }}">{{ page.title }}</a></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endblock content %}
|
Loading…
Reference in a new issue