generate an atom feed

This commit is contained in:
2020-08-29 14:28:11 +02:00
parent 72c07b6b55
commit e71a904120
5 changed files with 116 additions and 27 deletions

View File

@@ -3,19 +3,21 @@ cache := .cache
www_root := _site
www := $(www_root)/posts
post_index := $(www_root)/posts.html
feed := $(www_root)/feed.xml
post_compiler := src/webcc.ml
builddir := _build/default
POSTCC := $(builddir)/$(patsubst %.ml,%.exe,$(post_compiler))
INDEXCC := $(POSTCC) -i
FEEDCC := $(POSTCC) -a
post-sources := $(shell find $(src)/ -type f)
post-htmls := $(patsubst $(src)/%.md,$(www)/%.html,$(post-sources))
.PHONY: all serve clean $(POSTCC)
all: $(POSTCC) $(post-htmls) $(post_index) $(www_root)/static
all: $(POSTCC) $(post-htmls) $(post_index) $(feed) $(www_root)/static
cp -R ~/www/* $(www_root)
$(www):
@@ -27,6 +29,9 @@ $(www)/%.html: $(src)/%.md $(www)
$(post_index): $(post-sources)
$(INDEXCC) $^ -o $@
$(feed): $(post-sources)
$(FEEDCC) $^ -o $@
$(www_root)/static: static
cp -R static $(www_root)