-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmakefile
More file actions
41 lines (34 loc) · 927 Bytes
/
makefile
File metadata and controls
41 lines (34 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Variables
QUARTO = quarto
SOURCE_DIR = .
OUTPUT_DIR = _site
# Default target
all: render
# Render all Quarto files
render:
@echo "Rendering Quarto files..."
$(QUARTO) render $(SOURCE_DIR)
# Clean output directory
clean:
@echo "Cleaning up..."
rm -rf $(OUTPUT_DIR)
# Watch for changes and re-render
watch:
@echo "Watching files for changes..."
$(QUARTO) preview
# Render and publish to GitHub Pages
publish: render
@echo "Publishing to GitHub Pages..."
git add .
git commit -m "Publishing updates"
git push origin main
# Help
help:
@echo "Makefile for Quarto Project"
@echo "Usage:"
@echo " make render - Render the Quarto project"
@echo " make clean - Clean the output directory"
@echo " make watch - Watch for file changes and render"
@echo " make publish - Render and publish to GitHub Pages"
@echo " make help - Display this help"
.PHONY: all render clean watch publish help