From 6e074340dc012a63c6225cd01b8d328b75423cf9 Mon Sep 17 00:00:00 2001 From: b1ek Date: Mon, 8 Jan 2024 19:22:35 +1000 Subject: [PATCH] add blog --- content/_index.md | 3 +++ content/blog/_index.md | 9 +++++++++ content/blog/hi.md | 17 ++++++++++++++++ templates/custom/blog-post.html | 15 ++++++++++++++ templates/custom/blog.html | 35 +++++++++++++++++++++++++++++++++ 5 files changed, 79 insertions(+) create mode 100644 content/blog/_index.md create mode 100644 content/blog/hi.md create mode 100644 templates/custom/blog-post.html create mode 100644 templates/custom/blog.html diff --git a/content/_index.md b/content/_index.md index 08df87a..0e5c94f 100644 --- a/content/_index.md +++ b/content/_index.md @@ -36,6 +36,9 @@ I also made a lil badge to show if i am currently online. Cool, huh? ## Projects You can find the list of my projects [here](/projects). +## Blog +See [here](/blog) + ## Webrings!! I like webrings. diff --git a/content/blog/_index.md b/content/blog/_index.md new file mode 100644 index 0000000..14b37c8 --- /dev/null +++ b/content/blog/_index.md @@ -0,0 +1,9 @@ ++++ +template = "custom/blog.html" + +title = "Blog" ++++ + +[go home](/) + +My blog listings. \ No newline at end of file diff --git a/content/blog/hi.md b/content/blog/hi.md new file mode 100644 index 0000000..b94f315 --- /dev/null +++ b/content/blog/hi.md @@ -0,0 +1,17 @@ ++++ +template = 'custom/blog-post.html' + +title = 'Hi!' +description = 'First post here!' +date = '2024-08-01' +slug = 'hi' +year = 2024 +month = 1 +day = 8 +lang = 'en' + +[extra] +author = 'b1ek ' ++++ + +Hey, this is the first post here! We'll se how it goes from there. \ No newline at end of file diff --git a/templates/custom/blog-post.html b/templates/custom/blog-post.html new file mode 100644 index 0000000..b65e6c5 --- /dev/null +++ b/templates/custom/blog-post.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} + +{% block content %} + +

{{ page.title }}

+ + +
+ go to posts + {{ page.content | safe }} +
+ +{% endblock content %} \ No newline at end of file diff --git a/templates/custom/blog.html b/templates/custom/blog.html new file mode 100644 index 0000000..3323b31 --- /dev/null +++ b/templates/custom/blog.html @@ -0,0 +1,35 @@ +{% extends "base.html" %} + +{% block content %} + +

{{ section.title }}

+ + +
+ {{ section.content | safe }} +
+ +{% for year, posts in section.pages | group_by(attribute="year") %} +

Posts for {{ year }}

+ + + +
+{% endfor %} + + +{% endblock content %} \ No newline at end of file