aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-make/ctx.h
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2018-03-11 23:15:04 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2018-03-11 23:15:08 +0100
commitde43627dab99768da6bbaf6b81fb488507eef212 (patch)
treeb02c7ffd847fe76ee405decdf294a40aa4d1f5b4 /src/blogc-make/ctx.h
parentd5da0fc0d43b722cb5de853c6aca6c443aafa6b9 (diff)
downloadblogc-de43627dab99768da6bbaf6b81fb488507eef212.tar.gz
blogc-de43627dab99768da6bbaf6b81fb488507eef212.tar.bz2
blogc-de43627dab99768da6bbaf6b81fb488507eef212.zip
make: added `MAKE_POST` var to `posts` and `pages` rules
This variable will have the same string that was inserted in tbe `blogcfile` when listing posts and pages, and is useful to highlight active menu items, for example.
Diffstat (limited to 'src/blogc-make/ctx.h')
-rw-r--r--src/blogc-make/ctx.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/blogc-make/ctx.h b/src/blogc-make/ctx.h
index 3f70ead..294e0d3 100644
--- a/src/blogc-make/ctx.h
+++ b/src/blogc-make/ctx.h
@@ -37,6 +37,7 @@
typedef struct {
char *path;
char *short_path;
+ char *slug;
time_t tv_sec;
long tv_nsec;
bool readable;
@@ -64,7 +65,8 @@ typedef struct {
bc_slist_t *copy_fctx;
} bm_ctx_t;
-bm_filectx_t* bm_filectx_new(bm_ctx_t *ctx, const char *filename, struct stat *st);
+bm_filectx_t* bm_filectx_new(bm_ctx_t *ctx, const char *filename, const char *slug,
+ struct stat *st);
bc_slist_t* bm_filectx_new_r(bc_slist_t *l, bm_ctx_t *ctx, const char *filename);
bool bm_filectx_changed(bm_filectx_t *ctx, time_t *tv_sec, long *tv_nsec);
void bm_filectx_reload(bm_filectx_t *ctx);