A community-driven, web-based educational platform that presents complex computer science and machine learning concepts through an innovative side-by-side explanation format. This project bridges the gap between academic rigor and accessibility, making advanced topics understandable for students and self-learners.
- Side-by-Side Explanations: Original academic text displayed alongside plain-language explanations, making complex topics digestible
- Enhanced Interactive Navigation: Redesigned multi-level navigation with:
- Collapsible sections with smooth animations
- Auto-generated table of contents with proper hierarchy
- Context-aware chapter highlighting
- Improved arrow indicators and clean typography
- Dynamic Content Organization: Smart navigation that highlights current chapters and provides lazy-loaded TOCs for optimal performance
- Mathematical Typesetting: Beautiful LaTeX mathematical notation via MathJax
- Algorithm Formatting: Clean pseudocode blocks with line numbers using pseudocode.js
- Syntax Highlighting: Code blocks with automatic language detection and line numbers via Highlight.js
- GitHub Integration: Live contributor leaderboard and activity heatmap
- Discussion System: Chapter-specific comments powered by Utterances linked to GitHub issues
- Slack Community: Active community for discussions and collaboration
- Dark/Light Mode: Theme switching with persistent user preferences
- Mobile-Optimized: Fully responsive layout that adapts to all screen sizes
- Performance-First: Lazy loading, caching, and modular CSS for optimal performance
- Accessibility: ARIA-compliant navigation with keyboard support
- Frontend: HTML5, CSS3 (Grid, Flexbox, Custom Properties), Vanilla JavaScript
- Mathematical Rendering: MathJax for LaTeX expressions
- Algorithm Display: pseudocode.js for formatted algorithms
- Code Highlighting: Highlight.js for syntax highlighting
- Comments: Utterances for GitHub-based discussions
- Build Tools: Node.js scripts for automated content generation
- Node.js 14+ (required for build scripts and TOC generation)
- Any modern web browser
- (Optional) Python 3 for alternative dev server
-
Clone and setup:
git clone https://github.com/COD1995/ml-meta.git cd ml-meta npm install # Install dependencies (if any)
-
Build and serve (recommended):
npm run serve
This command will:
- Generate all navigation data and TOC
- Start development server on http://localhost:8000
- Automatically open your browser
If you prefer step-by-step control:
-
Generate TOC and navigation:
# Build everything npm run build # Or run individually: npm run build:data # Generate book chapter lists npm run build:nav # Generate main navigation structure
-
Start development server:
# Using Python (default) npm run dev # OR using Node.js npm run dev:node
-
Open browser: Navigate to http://localhost:8000
ml-meta/
βββ π assets/
β βββ π css/
β β βββ base.css # Global styles, CSS variables, theme definitions
β β βββ layout.css # Header, footer, container layouts
β β βββ books.css # Main index page book listings
β β βββ chapters.css # Two-column chapter view styles
β β βββ book-page.css # Individual book landing pages
β β βββ leaderboard.css # GitHub contributor leaderboard
β βββ π js/
β β βββ main.js # Core functionality: theme, TOC generation
β β βββ build-main-nav.js # Builds main navigation from data
β β βββ build-side-nav.js # Builds chapter-specific navigation
β β βββ main-nav-data.js # Navigation structure data (auto-generated)
β β βββ chapter-page.js # Chapter rendering: MathJax, pseudocode.js
β β βββ mathjax-config.js # MathJax configuration
β βββ π images/
β β βββ algorithms/ # Images for algorithm book chapters
β β βββ author_profiles/ # Contributor profile pictures
β βββ π templates/
β βββ chapter_page_template.html # Template for new chapters
βββ π books/
β βββ π algorithms/
β β βββ chapters/
β β βββ book-data.js # Auto-generated chapter list
β β βββ 00-prologue.html
β β βββ 01-algorithms-with-numbers.html
β β βββ ...
β βββ π pattern-classification/
β βββ chapters/
β βββ book-data.js # Auto-generated chapter list
β βββ ...
βββ π math-foundations/
β βββ index.html
β βββ in-simple-terms/ # Simplified math explanations
βββ π papers/
β βββ cv/ # Computer vision papers
β βββ training-research/ # ML training research papers
βββ π scripts/
β βββ generate-book-data.js # Generates book-data.js files
β βββ generate-main-nav-data.js # Generates navigation structure
βββ index.html # Main landing page
βββ package.json # Build scripts configuration
βββ README.md # This file
The project uses a sophisticated multi-level navigation system:
- Main Navigation (
build-main-nav.js
): Dynamically generates the site-wide navigation frommain-nav-data.js
- Chapter Navigation (
build-side-nav.js
): Creates context-aware chapter listings with current chapter highlighting - Table of Contents (
main.js
): Auto-generates TOCs from H2/H3 headings with lazy loading for remote chapters
- HTML Structure: Each chapter uses semantic HTML with
.explanation-block
containers - Mathematical Content: MathJax processes LaTeX expressions (configured in
mathjax-config.js
) - Algorithm Blocks: pseudocode.js formats algorithm notation with line numbers
- Syntax Highlighting: Highlight.js provides language-specific code highlighting
- Comments Integration: Utterances creates GitHub issue-based discussions per chapter
The project includes Node.js scripts for automated content generation:
# Generate chapter lists for all books
npm run build:data
# Generate main navigation structure
npm run build:nav
These scripts:
- Scan directories for HTML content files
- Extract titles and create sorted chapter lists
- Generate JavaScript data files for browser consumption
- Maintain hierarchical navigation structure
Command | Description |
---|---|
npm run serve |
Recommended: Build everything and start server |
npm run build |
Generate all navigation data and TOC |
npm run build:data |
Generate book chapter data only |
npm run build:nav |
Generate main navigation structure only |
npm run dev |
Start Python development server |
npm run dev:node |
Start Node.js development server |
npm run clean |
Clean temporary files |
npm run backup |
Backup original CSS/JS files |
npm run restore |
Restore from backup |
-
Create the HTML file in the appropriate book's
chapters/
directory:<!-- Use assets/templates/chapter_page_template.html as starting point -->
-
Follow the naming convention:
XX-chapter-name.html
(e.g.,03-dynamic-programming.html
) -
Structure your content with explanation blocks:
<div class="explanation-block"> <div class="original-text-container"> <!-- Original academic text --> </div> <div class="explanation-text"> <!-- Plain-language explanation --> </div> </div>
-
Regenerate navigation data:
npm run build:data npm run build:nav
- Create a new directory under
/books/your-book-name/
- Add a
chapters/
subdirectory - Place chapter HTML files in the
chapters/
directory - Run the build scripts to update navigation
- Place HTML files in the appropriate directory (
/math-foundations/
or/papers/
) - Run
npm run build:nav
to update the main navigation
If the table of contents isn't appearing or showing outdated information:
# Regenerate navigation data
npm run build
# Clear browser cache and refresh
# Or try incognito/private mode
- Python not found: Install Python 3 or use
npm run dev:node
- Port 8000 busy: Kill existing processes or change port
- Permission issues: Check file permissions in project directory
- Ensure build scripts have run:
npm run build
- Check browser console for JavaScript errors
- Verify HTML structure matches expected format
- Check that HTML files are in correct directory structure
- Verify file naming follows
XX-chapter-name.html
pattern - Ensure build scripts completed successfully
We welcome contributions from the community! Whether you're fixing a typo, adding explanations, or contributing entire chapters, your help is appreciated.
- Content Creation: Add new chapters, books, or explanations
- Code Improvements: Enhance JavaScript functionality or CSS styling
- Bug Fixes: Report and fix issues
- Documentation: Improve README, add code comments, or create guides
- Community Support: Help others in our Slack channel
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature
) - Make your changes
- Run build scripts if you've added new content
- Commit your changes with a descriptive message
- Push to your fork
- Open a Pull Request
- π Contribution Guide
- π¬ Join our Slack Community
- π Report Issues
- Jue (Bob) Guo - Lead Author, Ph.D. candidate at University at Buffalo
- Kristopher Kodweis - Lead Author, M.S. candidate in Mechanical Engineering
This project is open source and available under the MIT License.
- MathJax team for mathematical typesetting
- pseudocode.js developers for algorithm formatting
- Utterances for the commenting system
- All our contributors and community members
Made with β€οΈ by the ML-Meta Community