diff options
-rw-r--r-- | content/posts/2020-07-14Friz_box_turned_off_DHCP.html | 1 | ||||
-rw-r--r-- | content/posts/2021-12-26K8S_private_gitlab_registry_using_podman.html | 1 | ||||
-rw-r--r-- | src/blog.rs | 10 | ||||
-rw-r--r-- | templates/post.html | 2 |
4 files changed, 11 insertions, 3 deletions
diff --git a/content/posts/2020-07-14Friz_box_turned_off_DHCP.html b/content/posts/2020-07-14Friz_box_turned_off_DHCP.html index 569604b..7eb69ef 100644 --- a/content/posts/2020-07-14Friz_box_turned_off_DHCP.html +++ b/content/posts/2020-07-14Friz_box_turned_off_DHCP.html @@ -1,5 +1,4 @@ <section> - <h2>Friz.box turned off DHCP</h2> <p> If you turned off your DHCP server follow these steps to connect to FritzBox settings. <br/> diff --git a/content/posts/2021-12-26K8S_private_gitlab_registry_using_podman.html b/content/posts/2021-12-26K8S_private_gitlab_registry_using_podman.html index 43b8245..470965c 100644 --- a/content/posts/2021-12-26K8S_private_gitlab_registry_using_podman.html +++ b/content/posts/2021-12-26K8S_private_gitlab_registry_using_podman.html @@ -1,5 +1,4 @@ <section> - <h2>K8S private gitlab registry using podman</h2> <p> This is based on <a href="https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/">Log in to diff --git a/src/blog.rs b/src/blog.rs index 6c190a9..e549fb2 100644 --- a/src/blog.rs +++ b/src/blog.rs @@ -21,6 +21,8 @@ struct IndexTemplate { #[template(path = "post.html")] struct PostTemplate { content: String, + title: String, + date: String } pub struct BlogEntry { @@ -62,7 +64,13 @@ fn get_file_content(path: &str) -> String { pub fn render_post_page(path: &String) -> String { - PostTemplate { content: get_file_content(path) } + let blog = BlogEntry::new(path); + + PostTemplate { + content: get_file_content(path), + title: blog.title, + date: blog.datetime.format("%Y-%m-%d").to_string() + } .render_once() .unwrap() } diff --git a/templates/post.html b/templates/post.html index b1f9f72..4e5cf9a 100644 --- a/templates/post.html +++ b/templates/post.html @@ -6,6 +6,8 @@ <body> <% include!("header.html"); %> <main class="container"> + <h2><%- title %></h2> + <h5>created at: <%- date %></h2> <%- content %> </section> </main> |