This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a static site generator for Python cheatsheets. It converts Markdown files in the sheets/ directory to styled HTML pages using Jinja2 templates and Python's markdown library.
make build- Generate static HTML files from markdown (usesuv run --with jinja2 --with markdown generate.py)make serve- Build and serve locally on port 8000make clean- Remove generated files indist/make help- Show available targets
The project uses uv for dependency management and doesn't have a traditional requirements.txt. Dependencies are managed inline via uv run --with commands:
jinja2- Template enginemarkdown- Markdown processing with tables and fenced_code extensions
generate.py- Main static site generator scripttemplate.html- Jinja2 HTML template with embedded CSS stylingsheets/*.md- Markdown cheatsheet source filesdist/- Generated HTML output directorynetlify.toml- Deployment configuration
- Reads all
.mdfiles fromsheets/directory - Extracts H1 titles from markdown content
- Processes content (removes
<article>tags if present) - Converts markdown to HTML using extensions for tables and fenced code
- Renders content through
template.htmlwith title and content variables - Generates individual HTML files in
dist/ - Creates
index.htmlwith links to all cheatsheets
The template includes comprehensive CSS with:
- Lime green (#84cc16) color scheme for headings and accents
- Responsive design with mobile breakpoints
- Table styling with hover effects
- Code block and inline code formatting
- Clean typography using system fonts
- Create a new
.mdfile in thesheets/directory - Start with an H1 title (
# Title) - this becomes the page title - Use tables, code blocks, and standard markdown formatting
- Run
make buildto generate the HTML - The new cheatsheet will automatically appear in the index
The site is configured for Netlify deployment with special handling to make the uv cheatsheet the default index page (mv dist/uv.html dist/index.html).