Personal blog about software engineering and developer philosophy. Live at: https://zhisme.com/
- Static Site Generator: Hugo v0.145.0
- Theme: Custom theme
zhisme-blog(inthemes/zhisme-blog/) - Styling: SCSS (compiled from
themes/zhisme-blog/assets/sass/main.scss) - Frontend: Vanilla JavaScript (minimal, in
assets/js/) - Deployment: GitHub Actions → Docker image → Helm/Kubernetes (GitOps)
- Comments: Disqus integration
hugo_blog/
├── content/articles/ # Blog posts (main content)
│ └── YYYY-MM-DD-slug/ # Article folders with index.md
├── layouts/ # Custom layout overrides
│ ├── partials/ # Custom partial templates
│ ├── index.html # Homepage override
│ └── 404.html # Custom 404 page
├── themes/zhisme-blog/ # Custom theme
│ ├── layouts/ # Theme templates (_default, partials, shortcodes)
│ └── assets/sass/ # SCSS source partials (main.scss = entry)
├── assets/ # Site-level assets
│ ├── css/ # cv.css only (standalone CV page styles)
│ └── js/ # JavaScript (app.min.js, main.js)
├── static/ # Static files (served as-is)
├── archetypes/ # Content templates
└── hugo.toml # Main configuration
All articles in content/articles/ use this frontmatter:
---
title: "Article Title"
slug: "url-friendly-slug"
categories: ["Engineering"] # Common: Engineering, Philosophy
tags: ["tag1", "tag2"] # Specific tech/topics
intro: "Brief introduction for article cards"
description: "SEO meta description"
keywords: ["keyword1", "keyword2"] # For SEO
---- Each article lives in its own folder:
content/articles/YYYY-MM-DD-slug/ - Main content in
index.md - Images/assets co-located in the same folder
- Date can be inferred from filename (configured in
frontmatter.date)
- Primary focus: software engineering, developer tools, pragmatic engineering
- Common categories: Engineering, Philosophy, Tools
- Common tags: neovim, open-source, ruby, javascript, testing, productivity
- Base URL: https://zhisme.com/
- Permalinks:
/articles/:slug/(no dates in URLs) - Markup: Goldmark with unsafe HTML enabled, footnotes supported
- Syntax highlighting: custom classes (not inline styles)
- Taxonomies: categories and tags
- Custom built, not from Hugo themes gallery
- License: MIT (see
themes/zhisme-blog/LICENSE) - Layouts include custom partials for headers, footers, metadata
- SCSS-based styling: source partials in
themes/zhisme-blog/assets/sass/, entrymain.scss. Hugo compiles via libsass (toCSS, transpilerlibsass) inpartials/head/css.html→public/css/style.css(expanded in dev, minified+fingerprinted in prod). No committed compiled CSS — never hand-edit output, edit the partials. Requires Hugo extended.
hugo server -D # Run dev server with drafts
hugo server # Run without draftshugo --minify # Build for production (outputs to public/)- Automatic via GitHub Actions on push to
master(.github/workflows/build-and-deploy.yml) - Pipeline (GitOps):
- build-and-push: builds Docker image via
Dockerfile(runshugo --minify, output baked into image), pushes to a container registry tagged with short commit SHA - update-infra: bumps the image tag in a separate private GitOps infra repo (Helm values), which a Kubernetes cluster reconciles to roll out the new image
- build-and-push: builds Docker image via
- PRs run
.github/workflows/ci.yml(Hugo build smoke test, no deploy) - Image serving: built
public/is served by nginx in the k8s deployment - Source images in
content/are the truth; Hugo regenerates processed variants (webp/jpg) at build —resources/_gen/is a local cache, gitignored
- File Organization: Keep articles self-contained in dated folders
- Asset Handling: Styles are SCSS in
themes/zhisme-blog/assets/sass/, compiled by Hugo at build (no committed CSS exceptassets/css/cv.css). JS inassets/js/keeps source + minified. - Layout Overrides: Root
layouts/overridesthemes/zhisme-blog/layouts/ - No Node Modules: Pure Hugo, no npm/yarn build process needed
- Clean URLs: Use slugs, not dates in article URLs
- SEO Focused: Always include description, keywords, og:image considerations
- Create folder:
content/articles/YYYY-MM-DD-slug/ - Add
index.mdwith proper frontmatter - Write boilerplate content using Markdown
- Test locally with
hugo server -D - Remove draft status when ready
- Edit layouts in
themes/zhisme-blog/layouts/ - Or override in root
layouts/directory - SCSS changes go in
themes/zhisme-blog/assets/sass/partials; add new partials via@importinmain.scss. Hugo recompiles automatically (hugo server). Output ispublic/css/style.css— do not edit it.
- Custom partials:
layouts/partials/orthemes/zhisme-blog/layouts/partials/ - Shortcodes:
themes/zhisme-blog/layouts/shortcodes/ - JavaScript:
assets/js/main.js(don't forget to update minified version)
- This is a personal blog, not a corporate site - tone should be direct and pragmatic
- Focus is on practical software engineering insights, not theory
- Code examples should be production-quality and well-commented
- When adding features, maintain the minimalist aesthetic
- All changes should be tested locally before committing
- Don't create unnecessary files - prefer editing existing structure
- og.jpg requirements for Twitter/X cards: Use 1200x630 (2:1 ratio) or 1024x1024 (1:1 ratio). Avoid 3:2 ratio (e.g., 1536x1024) as Twitter fails to render these. Format must be JPG, prefer cartoon style when generating
- Do not generate text content for the blog, only assist in reviewing, editing author texts, and improving site structure or functionality as requested
- When I ask to generate article, this means scaffolding only