fix makefile for modular slide workflow
- remove references to deleted _frontmatter.md, _intro.md, _outro.md - add termin 0 to build targets - remove broken assemble target (files are now self-contained) - update build/pdf/html targets to work directly from slides/ - add copy-assets target to copy assets and materials to build/ - fix deploy path to /hdm/223015b/
This commit is contained in:
@@ -1,21 +1,19 @@
|
|||||||
# Makefile for Marp Slides Project
|
# Makefile for Marp Slides Project
|
||||||
|
|
||||||
.PHONY: help build dev watch pdf html clean install deploy assemble
|
.PHONY: help build dev watch pdf html clean install deploy copy-assets
|
||||||
|
|
||||||
# Slide components
|
# Directories
|
||||||
SLIDES_DIR = slides
|
SLIDES_DIR = slides
|
||||||
BUILD_DIR = build
|
BUILD_DIR = build
|
||||||
HEADER = $(SLIDES_DIR)/_frontmatter.md
|
|
||||||
INTRO = $(SLIDES_DIR)/_intro.md
|
|
||||||
OUTRO = $(SLIDES_DIR)/_outro.md
|
|
||||||
|
|
||||||
# Termin files (date-topic naming convention)
|
# Termin files (date-topic naming convention) - each is self-contained
|
||||||
|
TERMIN_0 = 2025-12-19-termin-0-intro
|
||||||
TERMIN_1 = 2025-12-19-termin-1-grundlagen-text-audio
|
TERMIN_1 = 2025-12-19-termin-1-grundlagen-text-audio
|
||||||
TERMIN_2 = 2026-01-09-termin-2-bild-audio-video
|
TERMIN_2 = 2026-01-09-termin-2-bild-audio-video
|
||||||
TERMIN_3 = 2026-01-23-termin-3-speichermedien-schnittstellen
|
TERMIN_3 = 2026-01-23-termin-3-speichermedien-schnittstellen
|
||||||
TERMIN_4 = 2026-01-30-termin-4-distribution-apis-zukunft
|
TERMIN_4 = 2026-01-30-termin-4-distribution-apis-zukunft
|
||||||
TERMIN_5 = 2026-xx-xx-termin-5-vertiefung-offene-fragen
|
TERMIN_5 = 2026-xx-xx-termin-5-vertiefung-offene-fragen
|
||||||
TERMINS = $(TERMIN_1) $(TERMIN_2) $(TERMIN_3) $(TERMIN_4) $(TERMIN_5)
|
TERMINS = $(TERMIN_0) $(TERMIN_1) $(TERMIN_2) $(TERMIN_3) $(TERMIN_4) $(TERMIN_5)
|
||||||
|
|
||||||
# Default target
|
# Default target
|
||||||
help:
|
help:
|
||||||
@@ -30,7 +28,6 @@ help:
|
|||||||
@echo " make html - Export all slides to HTML"
|
@echo " make html - Export all slides to HTML"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " Other:"
|
@echo " Other:"
|
||||||
@echo " make assemble - Assemble all termin files in build/"
|
|
||||||
@echo " make clean - Remove generated files"
|
@echo " make clean - Remove generated files"
|
||||||
@echo " make install - Install dependencies"
|
@echo " make install - Install dependencies"
|
||||||
@echo " make deploy - Deploy slides to server"
|
@echo " make deploy - Deploy slides to server"
|
||||||
@@ -40,17 +37,6 @@ $(BUILD_DIR)/.exists:
|
|||||||
@mkdir -p $(BUILD_DIR)
|
@mkdir -p $(BUILD_DIR)
|
||||||
@touch $@
|
@touch $@
|
||||||
|
|
||||||
# Assemble all termin files
|
|
||||||
assemble: $(BUILD_DIR)/.exists
|
|
||||||
@echo "Assembling slides..."
|
|
||||||
@for f in $(TERMINS); do \
|
|
||||||
echo " $$f.md"; \
|
|
||||||
cat $(HEADER) $(INTRO) $(SLIDES_DIR)/$$f.md $(OUTRO) > $(BUILD_DIR)/$$f.md; \
|
|
||||||
done
|
|
||||||
@echo " all.md"
|
|
||||||
@cat $(HEADER) $(INTRO) $(foreach t,$(TERMINS),$(SLIDES_DIR)/$(t).md) $(OUTRO) > $(BUILD_DIR)/all.md
|
|
||||||
@cp -r $(SLIDES_DIR)/assets $(BUILD_DIR)/ 2>/dev/null || true
|
|
||||||
|
|
||||||
# Development server - serves slides/ directly with HMR
|
# Development server - serves slides/ directly with HMR
|
||||||
dev:
|
dev:
|
||||||
@echo "Starting dev server with HMR..."
|
@echo "Starting dev server with HMR..."
|
||||||
@@ -58,30 +44,42 @@ dev:
|
|||||||
PORT=1312 npx @marp-team/marp-cli --server $(SLIDES_DIR)/
|
PORT=1312 npx @marp-team/marp-cli --server $(SLIDES_DIR)/
|
||||||
|
|
||||||
# Watch for changes
|
# Watch for changes
|
||||||
watch: assemble
|
watch:
|
||||||
npx @marp-team/marp-cli --watch $(BUILD_DIR)/all.md
|
npx @marp-team/marp-cli --watch $(SLIDES_DIR)/
|
||||||
|
|
||||||
|
# Copy assets and materials to build directory
|
||||||
|
copy-assets: $(BUILD_DIR)/.exists
|
||||||
|
@echo "Copying assets..."
|
||||||
|
@cp -r $(SLIDES_DIR)/assets $(BUILD_DIR)/
|
||||||
|
@cp -r $(SLIDES_DIR)/materials $(BUILD_DIR)/ 2>/dev/null || true
|
||||||
|
|
||||||
# Build all slides (HTML + PDF)
|
# Build all slides (HTML + PDF)
|
||||||
build: assemble
|
build: copy-assets
|
||||||
@echo "Building all slides..."
|
@echo "Building all slides..."
|
||||||
@for f in $(TERMINS); do \
|
@for f in $(TERMINS); do \
|
||||||
echo "Building $$f..."; \
|
echo "Building $$f..."; \
|
||||||
npx @marp-team/marp-cli $(BUILD_DIR)/$$f.md -o $(BUILD_DIR)/$$f.html; \
|
npx @marp-team/marp-cli $(SLIDES_DIR)/$$f.md -o $(BUILD_DIR)/$$f.html; \
|
||||||
npx @marp-team/marp-cli $(BUILD_DIR)/$$f.md --pdf --allow-local-files -o $(BUILD_DIR)/$$f.pdf; \
|
npx @marp-team/marp-cli $(SLIDES_DIR)/$$f.md --pdf --allow-local-files -o $(BUILD_DIR)/$$f.pdf; \
|
||||||
done
|
done
|
||||||
@echo "Building all.md..."
|
@echo "Done! Output in $(BUILD_DIR)/"
|
||||||
npx @marp-team/marp-cli $(BUILD_DIR)/all.md -o $(BUILD_DIR)/all.html
|
|
||||||
npx @marp-team/marp-cli $(BUILD_DIR)/all.md --pdf --allow-local-files -o $(BUILD_DIR)/all.pdf
|
|
||||||
|
|
||||||
# Export to PDF (all slides combined)
|
# Export all slides to PDF
|
||||||
pdf: assemble
|
pdf: $(BUILD_DIR)/.exists
|
||||||
@echo "Exporting to PDF..."
|
@echo "Exporting to PDF..."
|
||||||
npx @marp-team/marp-cli $(BUILD_DIR)/all.md --pdf --allow-local-files -o $(BUILD_DIR)/all.pdf
|
@for f in $(TERMINS); do \
|
||||||
|
echo " $$f.pdf"; \
|
||||||
|
npx @marp-team/marp-cli $(SLIDES_DIR)/$$f.md --pdf --allow-local-files -o $(BUILD_DIR)/$$f.pdf; \
|
||||||
|
done
|
||||||
|
@echo "Done! PDFs in $(BUILD_DIR)/"
|
||||||
|
|
||||||
# Export to HTML (all slides combined)
|
# Export all slides to HTML
|
||||||
html: assemble
|
html: copy-assets
|
||||||
@echo "Exporting to HTML..."
|
@echo "Exporting to HTML..."
|
||||||
npx @marp-team/marp-cli $(BUILD_DIR)/all.md -o $(BUILD_DIR)/all.html
|
@for f in $(TERMINS); do \
|
||||||
|
echo " $$f.html"; \
|
||||||
|
npx @marp-team/marp-cli $(SLIDES_DIR)/$$f.md -o $(BUILD_DIR)/$$f.html; \
|
||||||
|
done
|
||||||
|
@echo "Done! HTML files in $(BUILD_DIR)/"
|
||||||
|
|
||||||
# Clean generated files
|
# Clean generated files
|
||||||
clean:
|
clean:
|
||||||
@@ -96,5 +94,9 @@ install:
|
|||||||
# Deploy slides
|
# Deploy slides
|
||||||
deploy: build
|
deploy: build
|
||||||
@echo "Deploying slides..."
|
@echo "Deploying slides..."
|
||||||
scp $(BUILD_DIR)/all.html tengo@tuttle.uberspace.de:/home/tengo/html/malta/index.html
|
@echo "Copying HTML files..."
|
||||||
scp -r $(BUILD_DIR)/assets/ tengo@tuttle.uberspace.de:/home/tengo/html/malta/
|
scp $(BUILD_DIR)/*.html tengo@tuttle.uberspace.de:/home/tengo/html/hdm/223015b/
|
||||||
|
@echo "Copying assets..."
|
||||||
|
scp -r $(BUILD_DIR)/assets/ tengo@tuttle.uberspace.de:/home/tengo/html/hdm/223015b/
|
||||||
|
@echo "Copying materials..."
|
||||||
|
scp -r $(BUILD_DIR)/materials/ tengo@tuttle.uberspace.de:/home/tengo/html/hdm/223015b/ 2>/dev/null || true
|
||||||
|
|||||||
Reference in New Issue
Block a user