aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2020-09-11 01:07:43 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2020-09-11 01:15:14 +0200
commitff8898476685e6b7dff03231275a6a8bc2cbaf17 (patch)
treeafe908628d29fac856bd246f7959c53e95ccce4f /Makefile.am
parent15264fdb1062cf27be5c103f6bff5df67a7f78dc (diff)
downloadblogc-ff8898476685e6b7dff03231275a6a8bc2cbaf17.tar.gz
blogc-ff8898476685e6b7dff03231275a6a8bc2cbaf17.tar.bz2
blogc-ff8898476685e6b7dff03231275a6a8bc2cbaf17.zip
blogc: generate table of contents tree
this commit allows users to use the `{{ TOCTREE }}` variable in their templates, to get automatically generated table of contents for entries. The variable is binded to each entry, so it can be used in any block that runs in entry context, like `{% block entry %}`. There's a small performance penalty for this, because the table of contents is rendered for any entry, despite being used or not, and not generated on-demand. still missing documentation. tests are good enough.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am21
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 3f00119..8eae1d3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -48,6 +48,7 @@ noinst_HEADERS = \
src/blogc/sysinfo.h \
src/blogc/source-parser.h \
src/blogc/template-parser.h \
+ src/blogc/toctree.h \
src/blogc-git-receiver/post-receive.h \
src/blogc-git-receiver/pre-receive.h \
src/blogc-git-receiver/pre-receive-parser.h \
@@ -137,6 +138,7 @@ libblogc_la_SOURCES = \
src/blogc/sysinfo.c \
src/blogc/source-parser.c \
src/blogc/template-parser.c \
+ src/blogc/toctree.c \
$(NULL)
libblogc_la_CFLAGS = \
@@ -474,6 +476,7 @@ check_PROGRAMS += \
tests/blogc/check_renderer \
tests/blogc/check_source_parser \
tests/blogc/check_template_parser \
+ tests/blogc/check_toctree \
tests/common/check_config_parser \
tests/common/check_error \
tests/common/check_sort \
@@ -735,6 +738,24 @@ tests_blogc_check_template_parser_LDADD = \
libblogc_common.la \
$(NULL)
+tests_blogc_check_toctree_SOURCES = \
+ tests/blogc/check_toctree.c \
+ $(NULL)
+
+tests_blogc_check_toctree_CFLAGS = \
+ $(CMOCKA_CFLAGS) \
+ $(NULL)
+
+tests_blogc_check_toctree_LDFLAGS = \
+ -no-install \
+ $(NULL)
+
+tests_blogc_check_toctree_LDADD = \
+ $(CMOCKA_LIBS) \
+ libblogc.la \
+ libblogc_common.la \
+ $(NULL)
+
tests_common_check_config_parser_SOURCES = \
tests/common/check_config_parser.c \
$(NULL)