From 81ee1e91c4bc8d996e586eeff1eb6638656d3fc5 Mon Sep 17 00:00:00 2001 From: Sylvain Gauthier Date: Sat, 13 Mar 2021 17:34:13 +1100 Subject: add taglist function --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 20b82e4..be6e800 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ BLOG_FEEDS ?= rss atom BLOG_SRC ?= articles -.PHONY: help init build deploy clean +.PHONY: help init build deploy clean taglist ARTICLES = $(shell git ls-tree HEAD --name-only -- $(BLOG_SRC)/ 2>/dev/null) TAGFILES = $(patsubst $(BLOG_SRC)/%.md,tags/%,$(ARTICLES)) @@ -184,3 +184,6 @@ blog/atom.xml: $(ARTICLES) "`sed -n '1d;/^$$/{2{d;b};q};p' < $$FILE`"; \ done >> $@ printf '\n' >> $@ + +taglist: + grep -RIh '^;tags:' src | cut -d' ' -f2- | tr ' ' '\n' | sort | uniq -- cgit v1.2.3