How jim2017jim/howtocook works
Project Type and Purpose
• This is an open-source, content-driven static web service project (“HowToCook”) that organizes cooking recipes (Markdown files) into a user-friendly website and PDF.
• It leverages GitHub for source control, GitHub Actions for CI/CD, MkDocs (Python) or a custom Node script to generate static HTML/PDF, and Docker to package the site as a containerized web server.
Key Components
a. Source Repository (GitHub)
• Contains:
• Content directories (dishes/, tips/, starsystem/) of Markdown files
• CI config (.github/workflows/*.yml) and lint/build scripts (.github/manual_lint.js, readme-generate.js)
• Dockerfile, package.json (Node), requirements.txt (Python)
b. Continuous Integration / Delivery (GitHub Actions)
• On each commit or PR:
• Lint Markdown / code
• Generate README/docs via script
• Build static site & PDF (via mkdocs or custom tool)
• Build and push Docker image to GitHub Container Registry
• (Optional) Publish to GitHub Pages or npm registry
c. Container Registry
• Hosts the built Docker image (ghcr.io/anduin2017/how-to-cook:latest)
d. Web Service Container
• Runtime: Python (MkDocs) or Node static-site server
• Exposes HTTP on port 5000, serving HTML and PDF at /document.pdf
e. End Users
• Pull and run Docker (docker run -d -p 5000:5000 …)
• Browse the site in a web browser
• Install CLI/npm package (npm install how-to-cook) if provided
Highlighted Patterns & Principles
• Content as Code: Markdown source drives site.
• CI/CD Pipeline: Automated lint, doc generation, build, and publish.
• Containerization: Single Dockerfile packaging static site server.
• Separation of Concerns:
• Content (Markdown) vs. Build (CI scripts) vs. Runtime (web server)