blob: 5661e9bc246e08fed1f053e2c905c01acf453736 (
plain)
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
|
#!/usr/bin/env bash
# 1. Clear the old garbage
rm -rf public/
# 2. Render the whole website (HTML)
# This creates the directories and index.html files correctly
quarto render --to html
# 3. Render the Plain Text versions manually to ensure mirroring
# We find every .qmd, and render it to a .txt in the corresponding public/ folder
find . -name "*.qmd" -not -path "./.*" -not -path "./public/*" | while read -r file; do
# Get the directory structure (e.g., ./projects/index.qmd -> projects)
rel_dir=$(dirname "${file#./}")
# Get the filename without extension (e.g., index)
base_name=$(basename "$file" .qmd)
# Render to plain text directly into the correct public sub-directory
quarto render "$file" --to plain --output "${base_name}.txt" --output-dir "public/$rel_dir"
done
# 4. Add cv
mkdir public/cv
cp cv/index.pdf public/cv.pdf
cp cv/index.txt public/cv.txt
echo "Pushing to vps"
rsync -avz --delete public/ jayrup.me:~/homepage/public/
|