From de43627dab99768da6bbaf6b81fb488507eef212 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 11 Mar 2018 23:15:04 +0100 Subject: 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. --- src/blogc-make/ctx.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/blogc-make/ctx.h') 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); -- cgit v1.2.3-18-g5258