AGENTS.md
AGENTS.md
Project Overview
Jekyll static site (personal blog) deployed to GitHub Pages at gdunhao.com. Uses the Minima theme with heavy custom overrides — not a vanilla Minima site.
Architecture
- Layout chain: All pages use
default.html→ includeshead.html,header.html,footer.html. Content layouts (home.html,post.html,page.html,category.html) extenddefaultand injectsidebar.htmlvia `<aside class="sidebar">
</aside> `.
- Sidebar-first design: The Minima
site-headeris hidden with CSS (:has(.home-with-sidebar)) and replaced by a fixed sidebar (_includes/sidebar.html). Every content layout wraps content indiv.home-with-sidebar. Do not add layouts without this wrapper or the nav will break. - Styling:
assets/css/style.scssimports Minima then overrides ~950 lines of custom SCSS. All custom styles live in this single file — there are no partials. The file requires empty front matter (---\n---) for Jekyll to process it. - Custom
head.html: Loads Font Awesome 6.4 from CDN and linksstyle.css(notmain.css). Icons use FA classes likefab fa-github,far fa-calendar. - Category system: Posts are grouped into series via category index pages (e.g.,
java/java26.md,ai/augmenting-llms.md) that uselayout: categorywithpermalinkandcategoryfront matter. Thecategory.htmllayout filters posts bypage.category. To add a new series: create a top-level dir with an index.md, a matching_posts/<topic>/<series>/subdirectory, and add a nav entry in_includes/sidebar.html. - Sidebar nav: Navigation links in
_includes/sidebar.htmlare hardcoded, not generated from data. Category groups use a CSS-only collapsible pattern (<input type="checkbox">+<label>+:checkedsibling selector). When adding a new category series, manually add asidebar-nav-groupblock tosidebar.html.
Key Configuration (_config.yml)
Site identity and sidebar content are driven by config values: author.name, bio, avatar, tagline, github_username, twitter_username, linkedin_username. Update these in _config.yml, not in templates. Changes to _config.yml require a server restart.
Development
bundle install # install dependencies
bundle exec jekyll serve --livereload # dev server at localhost:4000
bundle exec jekyll serve --drafts # include _drafts/ posts
bundle exec jekyll build # build to _site/
Creating Posts
File: _posts/<topic>/<series>/YYYY-MM-DD-title.markdown (e.g., _posts/java/java26/2026-03-18-java26-http3.markdown). Front matter:
---
layout: post
title: "Title"
date: YYYY-MM-DD HH:MM:SS +0100
categories: topic series
---
Categories use a two-level scheme: the first category is the broad topic (e.g., java, ai) and the second is the series slug (e.g., java26, augmenting-llms). Both must match the category index page’s category front matter for the post to appear in the series listing.
Conventions
- Layouts always include the sidebar —
home.html,post.html,page.html, andcategory.htmlall use thehome-with-sidebar+sidebar.htmlpattern. New layouts must follow this. - No JavaScript — the site is pure HTML/CSS; avoid adding JS unless explicitly requested. Exception:
post.htmlhas a small inline script that opens post-content links in new tabs (target="_blank"). - Responsive breakpoint:
1024px— sidebar collapses from fixed left column to stacked top section. Maintain this breakpoint in new styles. _site/is generated output — never edit files there; they are overwritten on build.- Deployment: push to
mainbranch triggers GitHub Pages auto-deploy.CNAMEfile maps the custom domain.