diff --git a/blog b/blog index a909feb..ba65dda 160000 --- a/blog +++ b/blog @@ -1 +1 @@ -Subproject commit a909feba613d3a2e4cdc027c9e11c390f924a799 +Subproject commit ba65dda1e78a8b1c5120dce6284fd0230642b126 diff --git a/makefile b/makefile index 8841097..4454701 100644 --- a/makefile +++ b/makefile @@ -72,7 +72,8 @@ $(BLOG_RSS): cp $(BLOG_BUILD_DIR)/index.xml $@ $(BLOG_INDEX_LINKS): $(BLOG_TARGETS) | $(BLOG_TMP_DIR) - pipenv run python scripts/mkblogindex.py $(BLOG_TARGETS) > $@ + make --directory $(BLOG_BASE_DIR) html + cp $(BLOG_BUILD_DIR)/index.html $@ $(BLOG_OUT_DIR)/%.html: $(BLOG_OUT_DIR)/%.html.tmp $(HTML_INCLUDES) $(CSS_TARGETS) python ppp/ppp.py $< $(HTML_INCLUDES) > $@ diff --git a/scripts/mkblogindex.py b/scripts/mkblogindex.py deleted file mode 100644 index febbc86..0000000 --- a/scripts/mkblogindex.py +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env python3 - -import sys -import re - -# we expect the arguments to be filepaths to each blog post - -def print_usage(): - print("\nusage: python mkblogindex.py POSTS\n") - print("\n") - print("\t\tPOSTS\tfilepaths of blog posts") - -# check args for at least one file path -if len(sys.argv) < 2: - print_usage() - sys.exit(1) - -# posts are arguments from index 1 onwards -posts = sys.argv[1:] - -dir_pattern = re.compile("(.+)/(blog\/.+\.html)") -path_pattern = re.compile("(.+)\/(\d{4})\/(\d{1,2})\/(\d{1,2})\/(.+).html") -title_pattern = re.compile("