This repository contains my personal notes on various machine learning topics. The notes are organized by subject area and presented as a static website for easy navigation.
- ESLR: Notes from "Elements of Statistical Learning" by Hastie, Tibshirani, and Friedman
- General ML: General machine learning concepts, algorithms, and techniques
- NLP: Notes from "Speech and Language Processing" by Jurafsky & Martin
- Probability: Fundamentals of probability for machine learning
The site is generated using a simple Node.js static site generator:
- Make sure you have Node.js installed
- Install dependencies:
npm install
- Run the generator:
node index.js
- Open
index.html
in your browser to view the site
To add new notes:
-
Create a Markdown file in the appropriate subdirectory under
notes/
- Example:
notes/general/gen-12-my-new-topic.md
- Example:
-
Use the following format for your notes:
# Your Note Title ## First Section Content here... ## Second Section More content...
-
Optionally, add YAML frontmatter at the top:
--- title: "Custom Title (Optional)" date: "2023-08-01" ---
-
Re-run
node index.js
to regenerate the site
The generator will extract the title from either:
- The frontmatter
title
field - The first heading in the document
- The filename (as a fallback)
- The homepage lists all subject areas
- Each subject area has an index page listing all notes in that area
- You can navigate back to the home page from any note
- Node.js (v14 or newer)
- npm (comes with Node.js)
- Clone this repository or download the files
- Place your markdown notes in a folder called
notes
in the project root
project-root/
├── index.js
├── package.json
└── notes/
├── folder1/
│ ├── note1.md
│ └── note2.md
└── folder2/
├── note3.md
└── note4.md
- Install dependencies:
npm install
- Build the static site:
npm run build
- The built site will be in the
dist
directory - To preview locally:
npm run serve
Then open http://localhost:8080 in your browser.
-
Create a GitHub repository for your notes
-
After building the site, copy the contents of the
dist
directory to your repository's root directory:
cp -r dist/* .
- Commit and push your changes:
git add .
git commit -m "Add static site"
git push
- Go to your repository settings on GitHub
- Scroll down to the "GitHub Pages" section
- Set the source to the branch where you pushed the site (usually
main
ormaster
) - Your site will be published at
https://yourusername.github.io/repository-name/
You can customize the site by editing the config
object at the top of index.js
:
const config = {
sourceDir: 'notes', // Directory containing your markdown files
outputDir: 'dist', // Output directory for the static site
siteTitle: 'My Notes', // Site title
dateFormat: { year: 'numeric', month: 'long', day: 'numeric' }
};
This generator supports standard markdown syntax plus:
- Front matter for custom titles and dates:
--- title: My Custom Title date: 2023-01-01 ---
- LaTeX math equations:
- Inline:
$E = mc^2$
- Block:
$$E = mc^2$$
- Inline:
The generator uses:
marked
for Markdown parsinggray-matter
for parsing YAML front matterglob
for file discoverymkdirp
for directory creation- MathJax for rendering LaTeX equations
MIT