8428 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
70b6835c57 refactor(subscribe): remove standalone subscribe page
Remove subscribe.qmd as it's now redundant. The subscribe modal popup
provides a better inline experience, keeping users on site.
2025-12-02 21:37:29 -05:00
Vijay Janapa Reddi
1b0b629fe9 feat(subscribe): add elegant modal popup for newsletter subscription
Add ReOrg-style modal popup for newsletter subscriptions that appears
when clicking the Subscribe link in navbar. Provides smoother UX by
keeping users on site instead of navigating to external Buttondown page.

Features:
- Clean, minimal design with smooth animations
- Backdrop blur and slide-up effect
- Integrates with existing Buttondown account (mlsysbook)
- Collects first name, last name, email, role, and organization
- Success message shown after submission
- Auto-closes after 3 seconds
- Closes on overlay click, close button, or ESC key
- Dark mode support
- Fully responsive

The modal intercepts the navbar Subscribe link and provides an
elegant on-site subscription experience.
2025-12-02 21:36:08 -05:00
Vijay Janapa Reddi
7b7fd71657 feat(subscribe): Add embedded Buttondown newsletter signup page
- Create dedicated subscribe.qmd page with embedded form
- Beautiful on-brand design matching MLSysBook aesthetic
- Collects: first name, last name, email, role, organization
- Shows benefits: new chapters, lab updates, TinyTorch news
- Update navbar Subscribe link to point to new page
- Form submits to buttondown.email/mlsysbook
- Includes success message and mobile responsive design
2025-12-02 20:48:53 -05:00
Vijay Janapa Reddi
dbbc79c5cf refactor(navbar): Reorder items for better UX
- Feature TinyTorch first (new release)
- Group direct actions together: TinyTorch, Subscribe, Star, Support
- Move all dropdowns to the end: Hands-on, Downloads, GitHub
- Improves visual hierarchy and user flow
2025-12-02 20:27:50 -05:00
Vijay Janapa Reddi
2f7fd4d8f2 chore: Remove redirect folders (not needed with Netlify fix)
- Netlify now handles all redirects via netlify.toml (status 301)
- HTML redirect folders are no longer necessary
- Keeps codebase clean
2025-12-02 20:23:35 -05:00
Vijay Janapa Reddi
987b551759 feat(infra): Fix Netlify bandwidth issue and update navbar
- Change Netlify from proxy (status 200) to redirect (status 301)
- Reduces bandwidth costs from 100% to near-zero
- Netlify now only handles tiny redirect headers, GitHub Pages serves content
- Group Labs and Kits under 'Hands-on' dropdown in navbar
- Feature TinyTorch prominently as new release
- Add Newsletter subscribe button
- Group PDF and EPUB under 'Downloads' dropdown
- Cleaner navbar with better organization
2025-12-02 20:16:20 -05:00
Vijay Janapa Reddi
d9657c1717 fix(redirects): Use directory structure for extensionless URLs
- Move redirect HTML files from root to directories with index.html
- Enables mlsysbook.ai/pdf instead of mlsysbook.ai/pdf.html
- GitHub Pages serves /path/ and /path as /path/index.html automatically
- Changes: pdf.html → pdf/index.html (same for epub, kits, labs, changelog, tinytorch)
2025-12-02 19:29:23 -05:00
Vijay Janapa Reddi
29637acee4 feat(redirects): Add GitHub Pages HTML redirects to replace Netlify
- Add client-side redirect pages for short links (pdf, epub, kits, labs, changelog, tinytorch)
- Enables migration away from Netlify to reduce bandwidth costs
- Redirects use meta refresh + JavaScript for instant redirection
- Will work seamlessly once DNS points directly to GitHub Pages
2025-12-02 19:08:18 -05:00
github-actions[bot]
48a89cf041 Update contributors list [skip ci] 2025-12-02 21:16:51 +00:00
Didier Durand
5d8997c010 Fixing typos in 3 files (#1060) 2025-12-02 16:12:18 -05:00
Didier Durand
0dc46d44c8 Fixing typos in 2 files (#1058) 2025-12-01 08:53:23 -05:00
Vijay Janapa Reddi
f913b17380 fix(redirects): Update TinyTorch redirect to use dedicated domain
Previously redirected to GitHub Pages URL, which itself redirected to
tinytorch.ai, creating an unnecessary hop. Now redirects directly to
tinytorch.ai for better performance and cleaner URL routing.

Updated:
- quarto/_redirects: /tinytorch -> https://tinytorch.ai
- netlify.toml: /tinytorch -> https://tinytorch.ai
2025-11-30 17:02:43 -05:00
Vijay Janapa Reddi
37aa2bf3a9 Fix labels.txt download URL in image classification lab 2025-11-30 07:57:03 -05:00
Didier Durand
bf6d7f622e Fix typos in 2 files (#1056)
* Fixing typos in 3 files

* Fixing typos in 3 files

* Fixing typos in 2 files
2025-11-29 15:48:45 -05:00
Didier Durand
3c196d681c Fixing typos in 3 files (#1055) 2025-11-28 18:06:54 +01:00
Zeljko Hrcek
15c2b8df46 Update chapter-6 (#1054)
The TikZ code for Figure 6.15 has been updated.
Figure 6.1 has been redrawn.
2025-11-28 04:15:37 +01:00
github-actions[bot]
f591cde5a8 Update contributors list [skip ci] 2025-11-27 12:52:26 +00:00
Didier Durand
dc270692e8 Fixing typos in 3 files (#1051) 2025-11-27 13:45:44 +01:00
Vijay Janapa Reddi
aa25465477 chore: clean up build artifacts and update gitignore
Remove tracked build artifacts that should be regenerated:
- Diagram PDFs (3 files): Auto-generated by Quarto diagram extension
- Quarto HTML support files (frontiers_files): Bootstrap, clipboard, etc.

Update .gitignore to prevent future tracking:
- Add **/*_files/ pattern for Quarto HTML support directories
- These are auto-generated and should not be in version control

Cleanup also performed locally (not tracked in git):
- Removed .bak backup files
- Removed Python __pycache__ directories
- Removed loose diagram-*.pdf files from quarto root

All removed files will be regenerated automatically during builds.
2025-11-26 18:02:15 +01:00
Vijay Janapa Reddi
09a67d865f chore(epub): remove obsolete bash wrapper script
Removed fix_epub_references.sh as it has been replaced by the
cross-platform Python wrapper epub_postprocess.py
2025-11-26 09:04:30 +01:00
Vijay Janapa Reddi
44bff4bab9 fix(epub): replace bash script with cross-platform Python wrapper
Replaced fix_epub_references.sh with epub_postprocess.py to support
Windows builds. The new Python wrapper provides identical functionality
using only Python stdlib (zipfile, tempfile, shutil) and imports the
existing fix_cross_references.py module directly.

Key changes:
- Created epub_postprocess.py: Cross-platform wrapper for EPUB post-processing
- Updated _quarto-epub.yml: Changed post-render hook from .sh to .py
- Removed dependency on bash/shell for Windows compatibility

The wrapper extracts the EPUB, runs cross-reference fixes using the
existing dynamic section mapping system, and re-packages the EPUB
following EPUB3 standards (uncompressed mimetype first).
2025-11-26 09:04:19 +01:00
Vijay Janapa Reddi
7ab9c684d4 fix: mark Grove Vision AI V2 Object Detection as TBD
The Object Detection lab for Grove Vision AI V2 is still under development,
so marking the link as TBD instead of using a placeholder .qmd file path.
2025-11-25 13:58:28 -05:00
Vijay Janapa Reddi
8bbc76d5dd fix(epub): implement dynamic EPUB cross-reference resolution
- Created fix_epub_references.sh wrapper script to extract, fix, and repackage EPUBs
- Enhanced fix_cross_references.py to support extracted EPUB directory structure
- Added dynamic EPUB section mapping that scans actual chapter files
- Fixed Pattern 3 (EPUB-specific) references to use chapter-to-chapter links
- Links now correctly resolve to ch00X.xhtml#sec-id format instead of HTML paths
- Updated _quarto-epub.yml to use new wrapper script in post-render hook

This resolves the issue where @sec- references in lab overview files were
showing as unresolved .qmd paths in EPUB builds. The script now properly
converts them to working EPUB chapter references.
2025-11-25 13:20:05 -05:00
Vijay Janapa Reddi
ab6a836c4a fix(epub): convert additional .qmd file-path links to section references
Fix 6 more problematic .qmd file-path references that would cause
broken links in EPUB:

- labs.qmd: Convert 4 setup guide links to @sec- references
- motion_classification.qmd: Convert 2 DSP Spectral Features links

These cross-directory references need section IDs to work properly
in EPUB builds, just like the lab overview pages fixed earlier.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 12:38:32 -05:00
Vijay Janapa Reddi
aa65ce98d5 fix(epub): convert file-path links to section references in lab overviews
Convert broken .qmd file-path references to semantic @sec- references
that Quarto can resolve properly in EPUB builds.

This fixes the 19 EPUB validation errors where links in lab overview pages
pointed to non-existent .qmd files (e.g., href="./setup/setup.qmd").

Changes:
- Convert 17 file-path links to @sec- references across 4 lab overview pages
- Add Pattern 3 to fix_cross_references.py for EPUB (href="@sec-xxx")
- Add 23 lab section mappings to CHAPTER_MAPPING
- Add EPUB detection logic to post-render script
- Configure EPUB build to run fix_cross_references.py

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 11:59:24 -05:00
Vijay Janapa Reddi
d78a588205 fix(epub): guard remote resources with format-specific conditionals
Wrapped remote iframe embeds (YouTube, Looker Studio) with
when-format='html:js' conditionals to exclude them from EPUB builds.
EPUB spec prohibits remote resource references in strict mode.

Changes:
- index.qmd: Changed Looker Studio from 'html' to 'html:js', removed
  deprecated frameborder attribute, added EPUB fallback text
- kws.qmd: Wrapped both YouTube iframes with html:js conditionals

EPUB validation errors fixed:
- ERROR: Remote resource https://lookerstudio.google.com not allowed
- ERROR: Remote resource https://www.youtube.com/embed/e_OPgcnsyvM not allowed
- ERROR: Remote resource https://www.youtube.com/embed/wjhtEzXt60Q not allowed

Files modified:
- quarto/index.qmd:162-185
- quarto/contents/labs/seeed/xiao_esp32s3/kws/kws.qmd:52-54, 694-696
2025-11-25 10:31:03 -05:00
Vijay Janapa Reddi
1f3be88a56 fix(epub): wrap list items in ul tags in hardware evolution table
Fixed XHTML validation error where li elements were used directly
inside table cells without ul wrapper. EPUB/XHTML spec requires
li elements to be children of ul or ol, not direct children of td.

EPUB validation error fixed:
- ERROR: ch017.xhtml:542:35 element li not allowed here

File: quarto/contents/core/hw_acceleration/hw_acceleration.qmd
Table: tbl-hw-evolution (Hardware Specialization Trends)
Lines: 252-274
2025-11-25 10:24:20 -05:00
Vijay Janapa Reddi
d4f42722d9 fix(epub): correct backtick placement in raspberry pi instructions
Fixed typo where backtick was misplaced in 'Replace' causing
<raspberry_pi_ip> to be parsed as invalid custom HTML element
instead of being properly formatted as inline code.

EPUB validation error fixed:
- ERROR: element raspberry_pi_ip not allowed here

File: quarto/contents/labs/raspi/object_detection/object_detection.qmd
Line: 356
2025-11-25 10:12:45 -05:00
Vijay Janapa Reddi
b01474f192 fix: Remove deprecated frameborder attribute from iframes
- Replace frameborder="0" with border: none in CSS
- Updates YouTube embed iframes to be HTML5/EPUB3 compliant
- Fixes epubcheck validation errors for invalid attributes
2025-11-25 10:04:32 -05:00
Vijay Janapa Reddi
e55363d316 feat: Add comprehensive EPUB validator with epubcheck integration
- Create validate_epub.py utility for EPUB validation
- Integrates official epubcheck validator when available
- Custom checks for CSS variables and XML comment violations
- Detects common XHTML errors (unclosed tags, unescaped characters)
- Validates EPUB structure (mimetype, container.xml, OPF)
- Supports --quick flag to skip epubcheck for faster validation
- Provides detailed error reporting with file paths and line numbers
2025-11-25 09:49:55 -05:00
Vijay Janapa Reddi
31883f4fe3 feat: Add --all flag to pdf, epub, and html commands
- Add explicit --all flag requirement for building entire book
- Commands now require either chapter name or --all flag
- Update help text and examples to show new --all flag usage
- Running commands without arguments now shows helpful error message
2025-11-25 08:55:35 -05:00
Vijay Janapa Reddi
d85278f87e fix(epub): Replace CSS variables with literal values to prevent XML parsing errors
Addresses #1052

## Problem
The EPUB version was failing to open in ClearView with XML parsing errors:
"Comment must not contain '--' (double-hyphen)" at multiple lines.

## Root Cause
CSS custom properties (--crimson, --text-primary, etc.) contain double
hyphens which violate XML comment specifications when processed by strict
XML parsers in some EPUB readers like ClearView.

## Solution
- Removed :root CSS variable definitions
- Replaced all 66 instances of var() references with literal hex values
- Added documentation explaining why variables were removed
- Maintained color reference guide for future maintenance

## Changes
- Removed :root { --crimson: #A51C30; ... } block
- Replaced all var(--crimson) → #A51C30
- Replaced all var(--text-primary) → #1a202c
- Replaced all var(--text-secondary) → #4a5568
- Replaced all var(--text-muted) → #6c757d
- Replaced all var(--background-light) → #f8f9fa
- Replaced all var(--background-code) → #f1f3f4
- Replaced all var(--border-light) → #e9ecef
- Replaced all var(--border-medium) → #dee2e6
- Replaced all var(--crimson-dark) → #8B1729

## Testing
- Verified no remaining var() references in epub.css
- Verified no remaining CSS variable definitions
- Visual appearance remains identical (same hex values)
2025-11-25 08:40:47 -05:00
Vijay Janapa Reddi
040b95ef00 fix(epub): Replace CSS variables with literal values to prevent XML parsing errors
Addresses #1052

## Problem
The EPUB version was failing to open in ClearView with XML parsing errors:
"Comment must not contain '--' (double-hyphen)" at multiple lines.

## Root Cause
CSS custom properties (--crimson, --text-primary, etc.) contain double
hyphens which violate XML comment specifications. While the stylesheet
is linked externally in the built EPUB, some readers may embed or process
the CSS in ways that trigger strict XML parsers.

## Solution
Replaced all 66 instances of CSS variables with their literal hex color
values throughout epub.css. This ensures EPUB compatibility across
different readers while maintaining the same visual appearance.

## Changes
- quarto/assets/styles/epub.css: Removed :root variables, replaced all
  var() references with literal values, added documentation
- quarto/config/_quarto-epub.yml: Added note about inkscape requirement

## Testing
Built EPUB successfully, validated XHTML files with xmllint. CSS variables
confirmed present in original, absent in fixed version.
2025-11-25 02:53:08 -05:00
Didier Durand
75785d63a6 Fix typos in files (#1050)
* Fixing typos in 2 files

* Fixing typos in 2 files

* Fixing typos in files
2025-11-21 10:09:11 -05:00
github-actions[bot]
572ca4f179 Update contributors list [skip ci] 2025-11-20 11:56:42 +00:00
Didier Durand
23ce98b762 Fixing typos (#1049)
* Fixing typos in 2 files

* Fixing typos in 2 files
2025-11-20 06:52:02 -05:00
Didier Durand
cfbc4b3147 Fixing typos in 2 files (#1048) 2025-11-19 10:54:10 -05:00
github-actions[bot]
823c816101 Update contributors list [skip ci] 2025-11-16 15:31:35 +00:00
Didier Durand
2647959edc Fixing typos in 3 files (#1047) 2025-11-16 10:26:42 -05:00
Didier Durand
c0fa3cb08b Fixing typos in 3 files (#1046) 2025-11-13 10:36:21 -05:00
Didier Durand
f6f26769bb Fixing typos in 3 files (#1045) 2025-11-12 11:48:49 -05:00
Didier Durand
e47f7880e2 Fixing link and typo in README for SocratiQ (#1044) 2025-11-12 11:07:45 -05:00
Vijay Janapa Reddi
bc51497645 cleanup: remove Claude Code author attributions from scripts
Remove 'Author: Claude Code' lines from script docstrings.
These attributions should not be in the repository per project guidelines.
2025-11-11 13:10:51 -05:00
Vijay Janapa Reddi
570f1e9061 cleanup: remove build artifacts, cache files, and empty catalogs
Remove obsolete files that should not be tracked:
- 3 diagram PDF cache files (auto-generated by Quarto)
- 4 empty footnote_catalog.json files

All removed files are build artifacts or empty placeholders
that provide no ongoing value.
2025-11-11 12:59:12 -05:00
Vijay Janapa Reddi
baae0b57d9 fix(security): upgrade lychee-action to v2.0.2
Addresses Dependabot security alert for arbitrary code injection
vulnerability in lycheeverse/lychee-action < 2.0.2.

- Upgrade from v1.9.3 to v2.0.2
- Fixes potential attack vector via lycheeVersion input
- Impact: Low, vulnerability in link checker action
2025-11-11 12:17:37 -05:00
Vijay Janapa Reddi
b564473e32 chore(config): consolidate gitignore and restore _quarto.yml
- Add quarto/_quarto.yml to version control (HTML config)
- Remove quarto/_quarto.yml from root .gitignore
- Consolidate quarto/.gitignore into root .gitignore
- Add **/*.quarto_ipynb pattern to root .gitignore
- Delete redundant quarto/.gitignore file
2025-11-11 08:09:48 -05:00
Vijay Janapa Reddi
d090c04e45 Consolidates callout styling to extension
Refactors callout styling to be self-contained within the custom-numbered-blocks extension.

This eliminates duplication in dark mode styles, ensures consistency across all callout types, and simplifies maintenance by centralizing all callout styling logic in `foldbox.css`. Host stylesheets now only handle minimal Quarto interference prevention.
2025-11-11 07:45:18 -05:00
Vijay Janapa Reddi
c383a09160 Removes obsolete symlink and adds to ignore.
Removes a symbolic link to a config file that is no
longer used.

Adds the symbolic link filename to the .gitignore file
to prevent it from being accidentally added back to
the repository.
2025-11-10 19:58:08 -05:00
Vijay Janapa Reddi
afa6fdd36f Revert "Merge branch 'feature/alt-text-generation' into dev"
This reverts commit 9e2bfe4e64, reversing
changes made to 0b3f04d82d.
2025-11-10 19:57:42 -05:00
Vijay Janapa Reddi
9e2bfe4e64 Merge branch 'feature/alt-text-generation' into dev 2025-11-10 19:57:01 -05:00