From ab37785d2a20c02b8deb1d54e2f6427c3f77426c Mon Sep 17 00:00:00 2001 From: kamkow1 Date: Wed, 25 Jun 2025 21:12:42 +0200 Subject: [PATCH] add meta tags --- routes.c | 14 ++++++++++++++ tmpls/blog.html | 1 + tmpls/home.html | 1 + tmpls/page-missing.html | 1 + tmpls/template-blog.html | 1 + 5 files changed, 18 insertions(+) diff --git a/routes.c b/routes.c index 2153311..e38ca62 100644 --- a/routes.c +++ b/routes.c @@ -13,6 +13,12 @@ #define INTERNAL_SERVER_ERROR_MSG "Internal server error ;(. Try again later..." +#define META_TAGS \ + "" \ + "" \ + "" \ + "" + void make_internal_server_error(Route_Result *result) { result->status_code = 500; @@ -114,6 +120,8 @@ void route_page_not_found(struct mg_http_message *msg, Route_Result *result, voi get_timer_string(timer, sizeof(timer)); list_append(&env, fmt("-DRUNNING_SINCE=%s", timer)); + list_append(&env, fmt("-DMETA_TAGS=%s", META_TAGS)); + #if MY_DEBUG list_append(&env, "-DHOTRELOAD"); #endif @@ -148,6 +156,8 @@ void route_home(struct mg_http_message *msg, Route_Result *result, void *context char timer[100]; get_timer_string(timer, sizeof(timer)); list_append(&env, fmt("-DRUNNING_SINCE=%s", timer)); + + list_append(&env, fmt("-DMETA_TAGS=%s", META_TAGS)); #if MY_DEBUG list_append(&env, "-DHOTRELOAD"); @@ -186,6 +196,8 @@ void route_generic_blog(struct mg_http_message *msg, Route_Result *result, void get_timer_string(timer, sizeof(timer)); list_append(&env, fmt("-DRUNNING_SINCE=%s", timer)); + list_append(&env, fmt("-DMETA_TAGS=%s", META_TAGS)); + #if MY_DEBUG list_append(&env, "-DHOTRELOAD"); #endif @@ -279,6 +291,8 @@ void route_blog(struct mg_http_message *msg, Route_Result *result, void *context char timer[100]; get_timer_string(timer, sizeof(timer)); list_append(&env, fmt("-DRUNNING_SINCE=%s", timer)); + + list_append(&env, fmt("-DMETA_TAGS=%s", META_TAGS)); #if MY_DEBUG list_append(&env, "-DHOTRELOAD"); diff --git a/tmpls/blog.html b/tmpls/blog.html index bfba41d..c154700 100644 --- a/tmpls/blog.html +++ b/tmpls/blog.html @@ -4,6 +4,7 @@ Blog + <#META_TAGS>

Blog posts

diff --git a/tmpls/home.html b/tmpls/home.html index 00b0721..a5e9d77 100644 --- a/tmpls/home.html +++ b/tmpls/home.html @@ -4,6 +4,7 @@ Kamil's personal website + <#META_TAGS>

Kamil's personal website

diff --git a/tmpls/page-missing.html b/tmpls/page-missing.html index 6e44b05..67ad388 100644 --- a/tmpls/page-missing.html +++ b/tmpls/page-missing.html @@ -3,6 +3,7 @@ 404 - Page not found + <#META_TAGS>

The page you were looking for doesn't exist!

diff --git a/tmpls/template-blog.html b/tmpls/template-blog.html index a22e877..a377341 100644 --- a/tmpls/template-blog.html +++ b/tmpls/template-blog.html @@ -4,6 +4,7 @@ <#BLOG_POST_TITLE> + <#META_TAGS>