This document provides a quick overview of how this Jekyll website works. You should be able to understand the entire codebase in 5-10 minutes by reading this guide.
- Site Architecture
- Key Files
- Content Management
- Styling System
- JavaScript Functionality
- Workflow Guide
This site is built with Jekyll, a static site generator that transforms plain text into static websites. The key principles are:
- Content as Markdown: All content is written in Markdown files
- Front Matter: YAML metadata at the top of content files controls layout and metadata
- Layouts: HTML templates in
_layouts/
define how pages are structured - Includes: Reusable HTML components in
_includes/
(header, footer, etc.) - Collections: Content is organized into collections (
_posts
,_notes
, etc.)
The most important files in this codebase are:
_config.yml
- Main configuration file for the entire siteassets/main.scss
- Main stylesheet that controls site appearance_layouts/default.html
- Base layout template used by all pages_includes/head.html
- Contains metadata, CSS and JS imports_includes/header.html
- Site navigation_includes/footer.html
- Site footerindex.markdown
- The homepage
Content is organized into collections, defined in _config.yml
:
_posts/
- Blog posts (namedYYYY-MM-DD-title.markdown
)_notes/
- Academic notes (organized by topic in subdirectories)_pages/
- Static pages like "About"_papers/
- Academic papers
Each content file must have front matter (YAML between ---
lines) at the top:
---
layout: post
title: "Example Post"
date: 2023-01-01
---
The styling system uses Sass (SCSS) and is organized as follows:
assets/main.scss
- Primary stylesheet that imports other styles_sass/minima.scss
- Variables and utility mixins_sass/minima/
- Component stylesheets
Key style components:
- Typography: Uses EB Garamond as the primary font
- Academic components: Special styling for theorems, proofs, etc.
- Layout components: Responsive grid and containers
- Interactive elements: Collapsible sections, quote cards, etc.
To modify styles, edit assets/main.scss
or the files it imports.
The site uses minimal JavaScript for enhanced functionality:
assets/js/footnotes.js
- Creates tooltip-style popups for footnotesassets/js/toc.js
- Highlights the current section in the table of contents
Both are simple, standalone modules that don't rely on any frameworks.
-
Add a new blog post:
- Create file in
_posts/
namedYYYY-MM-DD-title.markdown
- Add front matter with layout, title, date
- Write content in Markdown
- Create file in
-
Update site information:
- Edit
_config.yml
to change site title, description, etc.
- Edit
-
Modify the visual design:
- Edit variables in
_sass/minima.scss
for global changes - Edit specific styles in
assets/main.scss
- Edit variables in
-
Add a new page:
- Create file in
_pages/
with front matter - Add to navigation by editing
nav_items
in_config.yml
- Create file in
- Clone the repository
- Run
bundle install
to install dependencies - Run
bundle exec jekyll serve
for live preview - Make changes and test locally
- Commit and push to GitHub to deploy (uses GitHub Pages)
For more detailed information, see the Jekyll documentation.