How comamoca/blog works
Main Components
• Content Repository: At the core is the “src” directory, which holds all website source files: markdown blog posts (in src/blog), page templates and layouts (under src/_includes/layouts), React/JSX components (in src/components), and supporting assets (images, style.css).
• Static Site Generator & Build Process: The project uses Deno (indicated by deno.json and deno.lock) along with Lume (as seen in the “plugins/lume” folder). This layer takes markdown content and JSX templates to produce static HTML pages.
• Development Environment and Tools: There are multiple configuration files and scripts (e.g., .envrc, tailwind.config.js, justfile, and Nix configuration files like flake.nix) that support development, formatting, and environment setups.
• CI/CD & Deployment: With a GitHub workflows directory (notably deploy.yaml) and instructions in the README (“nr dev”, “nix develop”), the design includes a continuous integration component that builds and deploys the site, likely to a hosting service (reference to “comamoca.pages.dev”).
• External Services: The README credits Cloudflare, which might be involved in DNS, CDN, or additional edge caching for the deployed site.
Relationships and Interactions
• The Source Code (Content, Templates, Components) is fed into the Static Site Generator (powered by Deno/Lume) during the build process.
• The Build Process (which might be triggered locally via “nr dev” or via GitHub Actions) compiles the markdown and template files into static HTML/CSS/JS.
• Deployment happens via the CI/CD pipeline where the generated static site is pushed to the hosting endpoint, possibly using Cloudflare and/or GitHub Pages.
• The development environment is supported by multiple tooling layers (Nix, justfile, scripts) that ensure consistency of builds and usefulness of utilities such as downloading fonts, migrating metadata, or logging.
Important Architectural Patterns and Technologies
• Separation of Content and Presentation: Markdown posts are separated from layout templates and React/JSX components.
• Static Site Generation: Use of a Deno-based generator (Lume) to convert markdown and templates into static pages.
• CI/CD Integration: Automated deployment using GitHub Actions.
• Modular Plugin Architecture: Custom plugins under the “plugins” directory to extend functionality (for example, link card generation).
• Use of Modern Tools: TailwindCSS for styling, Nix for reproducible development environments, and tools like “justfile” for task running.
• “Source Repository” containing “src (Content, Templates, Components)”, “assets”, “plugins”, “scripts”, and configuration files.
• “Development Environment” which includes local dev commands (nr dev, nix develop, etc.) and tooling (justfile, Nix configuration).
• “CI/CD Pipeline” representing GitHub workflows (deploy.yaml) that take source changes and trigger builds.
• “Deployment/Hosting” denoting the final deployment destination (e.g., comamoca.pages.dev) possibly tied with external services like Cloudflare.
• From “Source Repository” → “Build Process” → “Generated Static Site” → “Deployment”.
Detail
Happy diagramming!