Support custom corpus documentation templates

Mount a directory with Kalamar templates into the kalamar container, so
users can describe their own corpus in the KorAP user interface instead
of the placeholder page Kalamar shows by default. It defaults to
./custom and is created on demand; KALAMAR_TEMPLATES points it
elsewhere.

The mount itself is part of KorAP-Docker's compose file, whose
custom/README.md documents the available templates and ships examples;
this project only passes the directory through.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Change-Id: I7a1250020c2625b38dee2c1e4c33508f5af1eb8e
diff --git a/Makefile b/Makefile
index 2488165..3fca452 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,14 @@
 KALAMAR_INSTANCE ?=
 KALAMAR_INSTANCE_DIR := $(abspath $(KALAMAR_INSTANCE))
 
+# Directory with Kalamar templates describing your own corpus, mounted into the
+# kalamar container. Put a doc/corpus.html.ep page there to replace Kalamar's
+# placeholder corpus page; KorAP-Docker's custom/README.md lists the available
+# templates and ships examples. The directory is created on demand.
+#   make korap KALAMAR_TEMPLATES=my-corpus-docs
+KALAMAR_TEMPLATES ?= custom
+KALAMAR_TEMPLATES_DIR := $(abspath $(KALAMAR_TEMPLATES))
+
 # Optional: override the kalamar container image (e.g. a locally built tag).
 # The instance's compose.instance.yaml already defaults to a renderer-capable
 # image; set this to test a specific build, e.g.
@@ -205,7 +213,8 @@
 	java -jar lib/Krill-Indexer.jar -c lib/krill.cfg --progress -i $(subst " ",;,$^) -o $@
 
 korap: check-src $(TARGET_DIR)/index
-	curl -s https://raw.githubusercontent.com/KorAP/KorAP-Docker/master/compose.yaml | sed 's/64543:64543/$(KORAP_PORT):64543/g' | COMPOSE_PROFILES='export,open,lite' INDEX='$(TARGET_DIR)/index' $(if $(KALAMAR_INSTANCE),KALAMAR_INSTANCE_DIR='$(KALAMAR_INSTANCE_DIR)') $(if $(KALAMAR_IMAGE),KALAMAR_IMAGE='$(KALAMAR_IMAGE)') docker compose -p korap -f - $(if $(KALAMAR_INSTANCE),-f '$(KALAMAR_INSTANCE_DIR)/compose.instance.yaml') up
+	mkdir -p '$(KALAMAR_TEMPLATES_DIR)'
+	curl -s https://raw.githubusercontent.com/KorAP/KorAP-Docker/master/compose.yaml | sed 's/64543:64543/$(KORAP_PORT):64543/g' | COMPOSE_PROFILES='export,open,lite' INDEX='$(TARGET_DIR)/index' KALAMAR_TEMPLATES='$(KALAMAR_TEMPLATES_DIR)' $(if $(KALAMAR_INSTANCE),KALAMAR_INSTANCE_DIR='$(KALAMAR_INSTANCE_DIR)') $(if $(KALAMAR_IMAGE),KALAMAR_IMAGE='$(KALAMAR_IMAGE)') docker compose -p korap -f - $(if $(KALAMAR_INSTANCE),-f '$(KALAMAR_INSTANCE_DIR)/compose.instance.yaml') up
 
 $(TARGET_DIR)/index.tar.xz: $(TARGET_DIR)/index
 	tar -I 'xz -T0' -C $(dir $<) -cf $@ $(notdir $<)