fix(redirects): synchronize netlify and quarto redirect files

Corrected a typo in the EPUB path in 'quarto/_redirects' and added missing redirect rules to both 'quarto/_redirects' and 'netlify.toml'.

This ensures that the redirect behavior is consistent across both Netlify and direct GitHub Pages access, resolving discrepancies and improving robustness.
This commit is contained in:
Vijay Janapa Reddi
2025-08-22 07:33:37 -04:00
parent 0622c39e37
commit 7b384f9bbc
2 changed files with 22 additions and 3 deletions

View File

@@ -33,11 +33,21 @@
to = "/assets/downloads/Machine-Learning-Systems.pdf"
status = 301
[[redirects]]
from = "/pdf/"
to = "/assets/downloads/Machine-Learning-Systems.pdf"
status = 301
[[redirects]]
from = "/epub"
to = "/assets/downloads/Machine-Learning-Systems.epub"
status = 301
[[redirects]]
from = "/epub/"
to = "/assets/downloads/Machine-Learning-Systems.epub"
status = 301
[[redirects]]
from = "/changelog"
to = "/contents/frontmatter/changelog/changelog.html"

View File

@@ -3,12 +3,21 @@
/kits /contents/labs/kits.html 301
/kits/ /contents/labs/kits.html 301
/labs /contents/labs/labs.html 301
/labs/ /contents/labs/labs.html 301
/pdf /assets/downloads/Machine-Learning-Systems.pdf 301
/pdf/ /assets/downloads/Machine-Learning-Systems.pdf 301
/epub /assets/Machine-Learning-Systems.epub 301
/epub/ /assets/Machine-Learning-Systems.epub 301
/pdf/ /assets/downloads/Machine-Learning-Systems.pdf 301
/epub /assets/downloads/Machine-Learning-Systems.epub 301
/epub/ /assets/downloads/Machine-Learning-Systems.epub 301
/changelog /contents/frontmatter/changelog/changelog.html 301
/changelog/ /contents/frontmatter/changelog/changelog.html 301
/tinytorch https://mlsysbook.github.io/TinyTorch/intro.html 301
/tinytorch/ https://mlsysbook.github.io/TinyTorch/intro.html 301
# GitHub Pages fallback: use HTML redirect pages
# See kits.html for client-side redirect implementation