From 8499ee223040e58eb1dd84ac5fa0e768ec462ffa Mon Sep 17 00:00:00 2001 From: Ian Andwati Date: Mon, 7 Aug 2023 21:46:46 +0300 Subject: [PATCH] Getting started with zola --- .prettierignore | 1 + content/.gitkeep | 0 content/blog/_index.md | 6 ++++++ content/blog/first.md | 6 ++++++ content/blog/second.md | 6 ++++++ templates/.gitkeep | 0 templates/base.html | 13 +++++++++++++ templates/blog-page.html | 9 +++++++++ templates/blog.html | 14 ++++++++++++++ templates/index.html | 6 ++++++ 10 files changed, 61 insertions(+) create mode 100644 .prettierignore delete mode 100644 content/.gitkeep create mode 100644 content/blog/_index.md create mode 100644 content/blog/first.md create mode 100644 content/blog/second.md delete mode 100644 templates/.gitkeep create mode 100644 templates/base.html create mode 100644 templates/blog-page.html create mode 100644 templates/blog.html create mode 100644 templates/index.html diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..0b84df0 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +*.html \ No newline at end of file diff --git a/content/.gitkeep b/content/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/content/blog/_index.md b/content/blog/_index.md new file mode 100644 index 0000000..72bc989 --- /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" ++++ diff --git a/content/blog/first.md b/content/blog/first.md new file mode 100644 index 0000000..ff3aea1 --- /dev/null +++ b/content/blog/first.md @@ -0,0 +1,6 @@ ++++ +title = "My first post" +date = 2023-08-01 ++++ + +This is my first blog post diff --git a/content/blog/second.md b/content/blog/second.md new file mode 100644 index 0000000..8da27c8 --- /dev/null +++ b/content/blog/second.md @@ -0,0 +1,6 @@ ++++ +title = "My second post" +date = 2023-08-07 ++++ + +This is my second blog post. diff --git a/templates/.gitkeep b/templates/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..bb73f32 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,13 @@ + + + + + + Ian Andwati + + +
+
{% block content %}{% endblock %}
+
+ + diff --git a/templates/blog-page.html b/templates/blog-page.html new file mode 100644 index 0000000..63b8089 --- /dev/null +++ b/templates/blog-page.html @@ -0,0 +1,9 @@ +{% 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..311033d --- /dev/null +++ b/templates/blog.html @@ -0,0 +1,14 @@ +{% extends 'base.html' %} + +{% block content %} +

+ {{ section.title}} +

+ + +{% endblock content %} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..4ebb0fd --- /dev/null +++ b/templates/index.html @@ -0,0 +1,6 @@ +{% extends 'base.html' %} + +{% block content %} +

This is my blog made with zola

+

Click here to see my posts

+{% endblock content %}