Files
TinyTorch/scripts/build-docs.sh
Vijay Janapa Reddi 9ad6616d4d Add helper scripts for building book and docs
Replaced tito book and tito demo commands with simple shell scripts:

- scripts/build-book.sh - Build Jupyter Book (with optional browser open)
- scripts/build-docs.sh - Build full website docs (book + static assets)

Easier for developers to run directly without CLI overhead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 11:32:07 -05:00

37 lines
1.1 KiB
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# Build website documentation (static site)
# Usage: ./scripts/build-docs.sh
set -e # Exit on error
# Colors for output
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
echo -e "${BLUE}🌐 Building TinyTorch website documentation...${NC}"
# Check if docs/_build exists
if [ ! -d "docs/_build" ]; then
echo -e "${YELLOW}⚠️ No book build found. Building Jupyter Book first...${NC}"
./scripts/build-book.sh
fi
# Generate static assets
echo -e "${BLUE}📦 Generating static assets...${NC}"
# Copy static files to website directory (customize as needed)
if [ -d "website" ]; then
echo -e "${BLUE}📋 Copying book output to website/...${NC}"
mkdir -p website/docs
cp -r docs/_build/html/* website/docs/
echo -e "${GREEN}✅ Documentation copied to website/docs/${NC}"
else
echo -e "${YELLOW} No website/ directory found.${NC}"
echo -e "${YELLOW} Book output is in: docs/_build/html/${NC}"
fi
echo -e "${GREEN}✅ Documentation build complete!${NC}"
echo -e "${BLUE}📖 View at: docs/_build/html/index.html${NC}"