Update build scripts and site configuration

- Update PDF build scripts for site directory structure
- Update Jupyter Book configuration files
- Update site README with current build instructions
This commit is contained in:
Vijay Janapa Reddi
2025-11-14 18:27:20 -05:00
parent 892e70b46a
commit 03ecc5ccac
5 changed files with 17 additions and 15 deletions

View File

@@ -11,7 +11,7 @@ This directory contains the TinyTorch course content built with [Jupyter Book](h
### Option 1: HTML (Default Website)
```bash
cd book
cd site
jupyter-book build .
```
@@ -22,7 +22,7 @@ Output: `_build/html/index.html`
No LaTeX installation required!
```bash
cd book
cd site
make install-pdf # Install dependencies
make pdf-simple # Build PDF
```
@@ -34,7 +34,7 @@ Output: `_build/tinytorch-course.pdf`
Requires LaTeX installation (texlive, mactex, etc.)
```bash
cd book
cd site
make pdf
```
@@ -71,7 +71,7 @@ See **[PDF_BUILD_GUIDE.md](PDF_BUILD_GUIDE.md)** for:
## 🏗️ Structure
```
book/
site/
├── _config.yml # Jupyter Book configuration
├── _toc.yml # Table of contents
├── chapters/ # Course chapters (01-20)
@@ -113,7 +113,7 @@ Visit: http://localhost:8000
```bash
pip install sphinx-autobuild
sphinx-autobuild book book/_build/html
sphinx-autobuild site site/_build/html
```
## 🤝 Contributing

View File

@@ -35,7 +35,7 @@ exclude_patterns:
# GitHub repository configuration for GitHub Pages
repository:
url: https://github.com/mlsysbook/TinyTorch
path_to_book: book
path_to_book: site
branch: main
# HTML output configuration
@@ -53,6 +53,8 @@ html:
# Custom JavaScript
extra_js:
- _static/wip-banner.js
- _static/ml-timeline.js
- _static/hero-carousel.js
# Favicon configuration
favicon: "_static/favicon.svg"

View File

@@ -7,10 +7,10 @@ set -e # Exit on error
echo "🔥 Building TinyTorch PDF..."
echo ""
# Check if we're in the book directory
# Check if we're in the site directory
if [ ! -f "_config.yml" ]; then
echo "❌ Error: Must run from book/ directory"
echo "Usage: cd book && ./build_pdf.sh"
echo "❌ Error: Must run from site/ directory"
echo "Usage: cd site && ./build_pdf.sh"
exit 1
fi
@@ -51,7 +51,7 @@ if [ -f "_build/latex/tinytorch-course.pdf" ]; then
PDF_SIZE=$(du -h "_build/latex/tinytorch-course.pdf" | cut -f1)
echo ""
echo "✅ PDF build complete!"
echo "📄 Output: book/_build/latex/tinytorch-course.pdf"
echo "📄 Output: site/_build/latex/tinytorch-course.pdf"
echo "📊 Size: ${PDF_SIZE}"
echo ""
echo "To view the PDF:"

View File

@@ -7,10 +7,10 @@ set -e # Exit on error
echo "🔥 Building TinyTorch PDF (Simple Method - No LaTeX Required)..."
echo ""
# Check if we're in the book directory
# Check if we're in the site directory
if [ ! -f "_config.yml" ]; then
echo "❌ Error: Must run from book/ directory"
echo "Usage: cd book && ./build_pdf_simple.sh"
echo "❌ Error: Must run from site/ directory"
echo "Usage: cd site && ./build_pdf_simple.sh"
exit 1
fi
@@ -51,7 +51,7 @@ if [ -f "_build/pdf/book.pdf" ]; then
PDF_SIZE=$(du -h "_build/tinytorch-course.pdf" | cut -f1)
echo ""
echo "✅ PDF build complete!"
echo "📄 Output: book/_build/tinytorch-course.pdf"
echo "📄 Output: site/_build/tinytorch-course.pdf"
echo "📊 Size: ${PDF_SIZE}"
echo ""
echo "To view the PDF:"

View File

@@ -19,7 +19,7 @@ html_logo = 'logo-tinytorch-white.png'
html_sourcelink_suffix = ''
html_static_path = ['_static']
html_theme = 'sphinx_book_theme'
html_theme_options = {'search_bar_text': 'Search this book...', 'launch_buttons': {'notebook_interface': 'classic', 'binderhub_url': '', 'jupyterhub_url': '', 'thebe': False, 'colab_url': '', 'deepnote_url': ''}, 'path_to_docs': 'book', 'repository_url': 'https://github.com/mlsysbook/TinyTorch', 'repository_branch': 'main', 'extra_footer': '', 'home_page_in_toc': True, 'announcement': '', 'analytics': {'google_analytics_id': '', 'plausible_analytics_domain': '', 'plausible_analytics_url': 'https://plausible.io/js/script.js'}, 'use_repository_button': True, 'use_edit_page_button': True, 'use_issues_button': True}
html_theme_options = {'search_bar_text': 'Search this book...', 'launch_buttons': {'notebook_interface': 'classic', 'binderhub_url': 'https://mybinder.org', 'jupyterhub_url': '', 'thebe': False, 'colab_url': 'https://colab.research.google.com', 'deepnote_url': ''}, 'path_to_docs': 'site', 'repository_url': 'https://github.com/mlsysbook/TinyTorch', 'repository_branch': 'main', 'extra_footer': '', 'home_page_in_toc': True, 'announcement': '', 'analytics': {'google_analytics_id': '', 'plausible_analytics_domain': '', 'plausible_analytics_url': 'https://plausible.io/js/script.js'}, 'use_repository_button': True, 'use_edit_page_button': True, 'use_issues_button': True}
html_title = 'TinyTorch'
latex_engine = 'pdflatex'
mermaid_version = '10.6.1'