diff --git a/makefile b/makefile index f384573..d41e247 100644 --- a/makefile +++ b/makefile @@ -11,7 +11,7 @@ all: $(BUILD_DIR)/index.html $(BUILD_DIR)/syntax.css public $(BLOG_HTML) $(BUILD_DIR)/index.html: templates/index.html $(BLOG) page.py @mkdir -p "$(@D)" - $(PYTHON) page.py --index "$<" "$@" + $(PYTHON) page.py --index "$<" "$@" $(BLOG) $(BUILD_DIR)/blog/%.html: blog/%.md templates/blog.html page.py @mkdir -p "$(@D)" diff --git a/page.py b/page.py index 799e911..4209f45 100755 --- a/page.py +++ b/page.py @@ -2,11 +2,9 @@ import sys import re -from glob import glob -from ipo import read, write, map, dictmap, starstarmap, join, sort, ipo -from functools import partial from markdown import markdown import strictyaml +from ipo import read, write, map, dictmap, starstarmap, join, sort, ipo md_to_html = join("\n") | ipo(markdown) @@ -104,7 +102,7 @@ def safe_metadata(metadata): if sys.argv[1] == "--index": blog_post_list = ( - glob("blog/*.md") | + sys.argv[4:] | map(lambda filename: { **blog_page(filename, read_body=False)[0], }) |