From 012fedaaa1ddb2e009f51532c426289335ce59f5 Mon Sep 17 00:00:00 2001 From: Yash Karandikar Date: Sat, 20 Nov 2021 14:52:22 -0600 Subject: [PATCH] Create blog directory --- content/blog/_index.md | 6 ++++++ content/blog/first.md | 6 ++++++ templates/base.html | 2 +- templates/blog-page.html | 13 +++++++++++++ templates/blog.html | 12 ++++++++++++ 5 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 content/blog/_index.md create mode 100644 content/blog/first.md create mode 100644 templates/blog-page.html create mode 100644 templates/blog.html diff --git a/content/blog/_index.md b/content/blog/_index.md new file mode 100644 index 0000000..ca5be15 --- /dev/null +++ b/content/blog/_index.md @@ -0,0 +1,6 @@ ++++ +title = "List of blog posts" +sort_by = "date" +template = "blog.html" +page_template = "blog-page.html" ++++ \ No newline at end of file diff --git a/content/blog/first.md b/content/blog/first.md new file mode 100644 index 0000000..17a1f4f --- /dev/null +++ b/content/blog/first.md @@ -0,0 +1,6 @@ ++++ +title = "My first post" +date = "2021-11-20" ++++ + +This is my first blog post. \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index d513092..d35076e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -17,7 +17,7 @@ {% block content %} {% endblock %}
- home - projects - built with zola + home - projects - blog - built with zola
diff --git a/templates/blog-page.html b/templates/blog-page.html new file mode 100644 index 0000000..57960c8 --- /dev/null +++ b/templates/blog-page.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} + +{% block content %} +

+ {{ page.title }} +

+

+ + {{ page.date }} + +

+{{ page.content | safe }} +{% endblock content %} diff --git a/templates/blog.html b/templates/blog.html new file mode 100644 index 0000000..e1e75ea --- /dev/null +++ b/templates/blog.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block content %} +

+ {{ section.title }} +

+ +{% endblock content %}