diff --git a/content/blog/_index.md b/content/blog/_index.md new file mode 100644 index 0000000..f407998 --- /dev/null +++ b/content/blog/_index.md @@ -0,0 +1,6 @@ ++++ +title = "List of blog posts" +sort_by = "date" +template = "blog.html" +page_template = "post.html" ++++ diff --git a/content/blog/first.md b/content/blog/first.md new file mode 100644 index 0000000..a1d1130 --- /dev/null +++ b/content/blog/first.md @@ -0,0 +1,6 @@ ++++ +title = "My first post" +date = 2019-11-27 ++++ + +This is my first blog post. diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..19e9b28 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,17 @@ + + + + + + MyBlog + + + +
+
+ {% block content %} {% endblock content %} +
+
+ + + diff --git a/templates/blog.html b/templates/blog.html new file mode 100644 index 0000000..2529646 --- /dev/null +++ b/templates/blog.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} + +{% block content %} +

+ {{ section.title }} +

+ +{% endblock content %} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..54a3d90 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block content %} +

+ This is my blog made with Zola. +

+

Posts.

+{% endblock content %} diff --git a/templates/post.html b/templates/post.html new file mode 100644 index 0000000..f0f638e --- /dev/null +++ b/templates/post.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} + +{% block content %} +

+ {{ page.title }} +

+

{{ page.date }}

+{{ page.content | safe }} +{% endblock content %}