add meta tags
This commit is contained in:
14
routes.c
14
routes.c
@ -13,6 +13,12 @@
|
|||||||
|
|
||||||
#define INTERNAL_SERVER_ERROR_MSG "Internal server error ;(. Try again later..."
|
#define INTERNAL_SERVER_ERROR_MSG "Internal server error ;(. Try again later..."
|
||||||
|
|
||||||
|
#define META_TAGS \
|
||||||
|
"<meta name=\"description\" content=\"kamkow1's personal website and blog. Focused on C programming, weight lifting and personal thoughts.\" />" \
|
||||||
|
"<meta name=\"keywords\" content=\"C, C Programming, Blog, kamkow1, Linux\" />" \
|
||||||
|
"<meta name=\"author\" content=\"kamkow1\">" \
|
||||||
|
"<meta name=\"application-name\" content=\"aboba\">"
|
||||||
|
|
||||||
void make_internal_server_error(Route_Result *result)
|
void make_internal_server_error(Route_Result *result)
|
||||||
{
|
{
|
||||||
result->status_code = 500;
|
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));
|
get_timer_string(timer, sizeof(timer));
|
||||||
list_append(&env, fmt("-DRUNNING_SINCE=%s", timer));
|
list_append(&env, fmt("-DRUNNING_SINCE=%s", timer));
|
||||||
|
|
||||||
|
list_append(&env, fmt("-DMETA_TAGS=%s", META_TAGS));
|
||||||
|
|
||||||
#if MY_DEBUG
|
#if MY_DEBUG
|
||||||
list_append(&env, "-DHOTRELOAD");
|
list_append(&env, "-DHOTRELOAD");
|
||||||
#endif
|
#endif
|
||||||
@ -149,6 +157,8 @@ void route_home(struct mg_http_message *msg, Route_Result *result, void *context
|
|||||||
get_timer_string(timer, sizeof(timer));
|
get_timer_string(timer, sizeof(timer));
|
||||||
list_append(&env, fmt("-DRUNNING_SINCE=%s", timer));
|
list_append(&env, fmt("-DRUNNING_SINCE=%s", timer));
|
||||||
|
|
||||||
|
list_append(&env, fmt("-DMETA_TAGS=%s", META_TAGS));
|
||||||
|
|
||||||
#if MY_DEBUG
|
#if MY_DEBUG
|
||||||
list_append(&env, "-DHOTRELOAD");
|
list_append(&env, "-DHOTRELOAD");
|
||||||
#endif
|
#endif
|
||||||
@ -186,6 +196,8 @@ void route_generic_blog(struct mg_http_message *msg, Route_Result *result, void
|
|||||||
get_timer_string(timer, sizeof(timer));
|
get_timer_string(timer, sizeof(timer));
|
||||||
list_append(&env, fmt("-DRUNNING_SINCE=%s", timer));
|
list_append(&env, fmt("-DRUNNING_SINCE=%s", timer));
|
||||||
|
|
||||||
|
list_append(&env, fmt("-DMETA_TAGS=%s", META_TAGS));
|
||||||
|
|
||||||
#if MY_DEBUG
|
#if MY_DEBUG
|
||||||
list_append(&env, "-DHOTRELOAD");
|
list_append(&env, "-DHOTRELOAD");
|
||||||
#endif
|
#endif
|
||||||
@ -280,6 +292,8 @@ void route_blog(struct mg_http_message *msg, Route_Result *result, void *context
|
|||||||
get_timer_string(timer, sizeof(timer));
|
get_timer_string(timer, sizeof(timer));
|
||||||
list_append(&env, fmt("-DRUNNING_SINCE=%s", timer));
|
list_append(&env, fmt("-DRUNNING_SINCE=%s", timer));
|
||||||
|
|
||||||
|
list_append(&env, fmt("-DMETA_TAGS=%s", META_TAGS));
|
||||||
|
|
||||||
#if MY_DEBUG
|
#if MY_DEBUG
|
||||||
list_append(&env, "-DHOTRELOAD");
|
list_append(&env, "-DHOTRELOAD");
|
||||||
#endif
|
#endif
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<title>Blog</title>
|
<title>Blog</title>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="stylesheet" href="/etc/simple.css" />
|
<link rel="stylesheet" href="/etc/simple.css" />
|
||||||
|
<#META_TAGS>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Blog posts</h1>
|
<h1>Blog posts</h1>
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<title>Kamil's personal website</title>
|
<title>Kamil's personal website</title>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="stylesheet" href="/etc/simple.css" />
|
<link rel="stylesheet" href="/etc/simple.css" />
|
||||||
|
<#META_TAGS>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Kamil's personal website</h1>
|
<h1>Kamil's personal website</h1>
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>404 - Page not found</title>
|
<title>404 - Page not found</title>
|
||||||
<link rel="stylesheet" href="/etc/simple.css" />
|
<link rel="stylesheet" href="/etc/simple.css" />
|
||||||
|
<#META_TAGS>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>The page you were looking for doesn't exist!</h1>
|
<h1>The page you were looking for doesn't exist!</h1>
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title><#BLOG_POST_TITLE></title>
|
<title><#BLOG_POST_TITLE></title>
|
||||||
<link rel="stylesheet" href="/etc/simple.css" />
|
<link rel="stylesheet" href="/etc/simple.css" />
|
||||||
|
<#META_TAGS>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="content"></div>
|
<div id="content"></div>
|
||||||
|
Reference in New Issue
Block a user