Files
223015b/PLAN-split-slides.md
T

1.8 KiB

Plan: Split index.md into multiple files

Current state

  • ~4200 lines, 5 sessions + intro/outro
  • Shared: frontmatter, styles, intro slides (title, about, schedule, survey, overview)
  • Per-session: actual content

Proposed structure

slides/
├── _frontmatter.yml      # shared marp config
├── _styles.md            # shared CSS
├── _intro.md             # title, about, schedule, survey, overview
├── termin-1.md           # Session 1 content
├── termin-2.md           # Session 2 content
├── termin-3.md           # Session 3 content
├── termin-4.md           # Session 4 content
├── termin-5.md           # TBA session
└── _outro.md             # Q&A, license

Makefile targets

# Shared parts
HEADER = slides/_frontmatter.yml slides/_styles.md
INTRO  = slides/_intro.md
OUTRO  = slides/_outro.md

# Build single termin (intro + content + outro)
build-termin-%:
	cat $(HEADER) $(INTRO) slides/termin-$*.md $(OUTRO) > build/termin-$*.md
	marp build/termin-$*.md -o build/termin-$*.html

# Dev mode for single termin
dev-%:
	cat $(HEADER) $(INTRO) slides/termin-$*.md $(OUTRO) > build/.dev.md
	PORT=1312 marp --server build/

# Build all
build-all:
	cat $(HEADER) $(INTRO) slides/termin-*.md $(OUTRO) > build/all.md
	marp build/all.md -o build/all.html

Usage

make dev-1          # preview termin 1
make dev-3          # preview termin 3
make build-termin-2 # build termin 2
make build-all      # build everything

Trade-offs

  • Requires intermediate file generation
  • Can't use marp --watch directly on source (need wrapper)
  • But: clean separation, single source of truth for styles

Status

  • Learn Marp/Marpit in depth first
  • Implement split
  • Update Makefile
  • Test all targets