forked from ghamarian/pythonck
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_docs.sh
More file actions
executable file
Β·59 lines (50 loc) Β· 1.73 KB
/
test_docs.sh
File metadata and controls
executable file
Β·59 lines (50 loc) Β· 1.73 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
echo "π Testing Quarto Documentation Setup"
echo "===================================="
# Check if documentation directory exists
DOC_PATH="/projects/pythonck/documentation/_site"
if [ -d "$DOC_PATH" ]; then
echo "β
Documentation directory exists: $DOC_PATH"
# Check permissions
echo "π Directory permissions:"
ls -la "$DOC_PATH/"
# Check if index.html exists
if [ -f "$DOC_PATH/index.html" ]; then
echo "β
index.html exists"
echo "π index.html size: $(stat -f%z "$DOC_PATH/index.html" 2>/dev/null || stat -c%s "$DOC_PATH/index.html" 2>/dev/null) bytes"
else
echo "β index.html missing"
fi
# Check key files
echo ""
echo "π Key files check:"
for file in "index.html" "search.json"; do
if [ -f "$DOC_PATH/$file" ]; then
echo "β
$file exists"
else
echo "β $file missing"
fi
done
# Check subdirectories
echo ""
echo "π Subdirectories:"
ls -la "$DOC_PATH/" | grep '^d'
else
echo "β Documentation directory not found: $DOC_PATH"
echo "π Checking if it exists elsewhere..."
find /projects -name "_site" -type d 2>/dev/null || echo "No _site directories found"
fi
echo ""
echo "π Testing documentation access:"
echo "Direct file test:"
if [ -f "$DOC_PATH/index.html" ]; then
echo "β
Can read index.html directly"
else
echo "β Cannot read index.html directly"
fi
echo ""
echo "π§ Nginx configuration hints:"
echo "1. Check nginx error log: sudo tail -f /var/log/nginx/error.log"
echo "2. Test nginx config: sudo nginx -t"
echo "3. Check file permissions: ls -la $DOC_PATH/"
echo "4. Test direct file access: curl -I https://ck.silobrain.com/"