mirror of
https://github.com/nicholaswilde/recipes.git
synced 2025-10-29 03:33:28 +00:00
3.3 KiB
3.3 KiB
Project Overview
This project is a personal recipe collection managed as a documentation site using MkDocs with the Material theme. Recipes are primarily written in a custom .cook format and then converted to Markdown (.md) files, which are then served by MkDocs. The site is deployed to GitHub Pages. The project uses various tools for linting, spellchecking, and link checking to maintain quality.
Main Technologies
- MkDocs: Static site generator for documentation.
- MkDocs Material Theme: Provides the visual theme for the documentation site.
- Taskfile: A task runner for automating development and deployment workflows.
- Docker: Used to containerize various development tools and the MkDocs server.
- Cooklang: A plain text format for writing recipes, indicated by
.cookfiles and thecook servercommand. - Python: Used for MkDocs and its plugins.
- Git: Version control system.
- GitHub Actions: For continuous integration and deployment to GitHub Pages.
- Pre-commit hooks: For enforcing code quality and formatting before commits.
Building and Running
- Build MkDocs Docker image:
task build - Start local development server (Docker):
task serve(access athttp://0.0.0.0:8000) - Start local development server (local MkDocs install):
task serve-local - Start Cooklang server:
task server - Deploy to GitHub Pages: The GitHub Actions workflow
ci.yamlautomatically deploys the docs on pushes tomainbranch (pathsdocs/**,mkdocs.**). Manually, this would involvemkdocs gh-deploy --forceafter installing dependencies.
Development Conventions
- Pre-commit hooks:
trailing-whitespace: Removes trailing whitespace.end-of-file-fixer: Ensures files end with a newline.mixed-line-ending: Standardizes line endings.markdownlint: Lints Markdown files for style and consistency.markdown-link-check: Checks for broken links in Markdown files.
- Linting:
task lint: Runsmarkdownlintandyamllint.task markdownlint: Runsmarkdownlint-cli.task yamllint: Runsyamllint.
- Spellchecking:
task spellcheck(usesspellchecker-cliwithdictionary.txt). - Link Checking:
task linkcheck(usesmarkdown-link-check). - Recipe Management: Recipes are stored in
cook/as.cookfiles. There are scripts to manage these, such asscripts/commit.shandscripts/move.sh. - Markdown Formatting: Specific formatting for images (
add-lazy-loading) and temperatures (deg) is applied usingsed. - Front Matter: Markdown files use front matter for metadata like comments and tags.
- Dependencies: Python dependencies for MkDocs are managed via
pip installin the CI workflow.spellchecker-cliis installed globally vianpm install. - Recipe Markdown Pages: Recipe markdown pages in
docs/should use emoji fromincludes/emoji.yaml. - Recipe Markdown Format: Recipe markdown pages should follow a consistent format, including front matter for metadata (e.g., comments, tags), a main title with an emoji, an image with
loading=lazy, a table for serving and time information, and sections for ingredients, cookware, and instructions. Instructions should be numbered steps, with!!! tipused for additional information.