summaryrefslogtreecommitdiff
path: root/blog.h
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-07-19 21:14:51 -0400
committerJakob Kaivo <jkk@ung.org>2019-07-19 21:14:51 -0400
commit339cd70e8b9864a3d575a538112f9a7100b1a750 (patch)
treea2ca784a572c803f4a5d2d8f96041ef58876e007 /blog.h
parent8197bb3617521d63943ac09db969bd7d66e6f9f7 (diff)
remove hard-coding of my name and email address from postings
Diffstat (limited to 'blog.h')
-rw-r--r--blog.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/blog.h b/blog.h
index 590c18b..85bf490 100644
--- a/blog.h
+++ b/blog.h
@@ -2,7 +2,6 @@
#define BLOG_H
#define PASSWORD_FILE "/blog/password"
-#define DATA_DIRECTORY "/jakob"
#define DOCTYPE "<!DOCTYPE html>\n"
#define HTML "<html lang=\"en\">\n"
@@ -14,20 +13,23 @@
#define HTML_HEAD DOCTYPE HTML META TITLE ICON STYLE BODY
-#define ADDRESS "<address>Copyright &copy; %d <a href=\"/\">Jakob Kaivo</a> &lt;<a href=\"mailto:jakob@kaivo.net\">jakob@kaivo.net</a>&gt;\n"
+#define ADDRESS "<address>Copyright &copy; %1$d <a href=\"/\">%2$s</a> &lt;<a href=\"mailto:%3$s\">%3$s</a>&gt;\n"
#define HTML_TAIL "\n" ADDRESS "</body>\n</html>\n"
void read_post_data(void);
char *find_post_data(char *key);
+char *user_name(const char *user);
+char *user_email(const char *user);
+
int authenticate(const char *username, const char *password);
int handle_post(void);
int show_entry(const char *path);
-void add_to_index(const char *path, const char *title);
+void add_to_index(const char *user, const char *path, const char *title);
int current_year(void);