diff options
-rw-r--r-- | config.h | 1 | ||||
-rw-r--r-- | pages.c | 12 |
2 files changed, 13 insertions, 0 deletions
@@ -91,6 +91,7 @@ static const char *posts_info = "<h1>Posts</h1>My posts about programming and t static const char *posts_content = "content/blog/"; static const char *posts_output_dir = "posts/"; static const int posts_per_page = 10; +static const int ignore[] = {}; /* ignore these posts */ /* each page to be generated go into this array */ static const struct page pages[] = { @@ -484,6 +484,18 @@ postspage(int flags) { if (strstr(ent->d_name, ".txt") != NULL) { + int ign = 0; + /* check if post should be ignored */ + for (int i = 0; i < sizeof(ignore)/sizeof(ignore[0]); i++) + { + if (atoi(ent->d_name) == ignore[i]) + { + printf("ignoring post %d\n", atoi(ent->d_name)); + ign = 1; + } + } + if (ign) + continue; posts[totalposts] = atoi(ent->d_name); // gross totalposts++; } |