AGENTS.md - Jekyll Blog Development Guide
Build Commands
First-time Setup
bundle install
Local Development
# Start Jekyll server with live reload
bundle exec jekyll serve --livereload --future
# Runs at http://127.0.0.1:4000/
Testing
No unit test framework. Use Playwright MCP for browser testing:
- Navigate with
mcp_playwright_browser_navigate - Check console errors with
mcp_playwright_browser_console_messages - Test responsive design with
mcp_playwright_browser_resize - Take screenshots with
mcp_playwright_browser_take_screenshot
Test these scenarios:
- Home page with pagination
- Individual blog posts with TOC
- Tags page filtering
- Navigation flows
- Responsive layouts (mobile/tablet/desktop)
- Console errors and network failures
Project Architecture
Theme: Terminal/PowerShell UI
- Dark blue backgrounds (#012456), cyan highlights (#00ffff)
- Navigation styled as PowerShell commands (e.g.,
PS C:\ALProjects\BCBlog>) - Font: Cascadia Code for code, system-ui for body text
- All interactive elements maintain PowerShell metaphor
Layout Hierarchy
base.html- Master layout (nav, footer, analytics, Mermaid.js)home.html- Blog listing with sidebarpost.html- Individual post with TOCpage.html- Static pages
File Structure
_posts/: Blog posts (YYYY-MM-DD-title.md)_layouts/: Jekyll templates_includes/: Reusable components (toc.html, nav.html, header.html, google-analytics.html)_sass/terminal-theme.scss: Theme stylesassets/css/main.scss: Compiled CSSassets/js/: JavaScript functionalityassets/images/YYYY-MM-DD-post-slug/: Post images
Code Style Guidelines
Liquid Templates (Jekyll)
- Use
{%- -%}for whitespace control - Semantic HTML5 elements
- Cache-busting for JS:
?v={{ site.time | date: '%s' }} - Reference assets with
| relative_urlfilter
SCSS Styles
- Use theme variables from
terminal-theme.scss(ps-bg, ps-cyan, ps-yellow, ps-green, ps-red, ps-magenta) - BEM-like naming convention
- Mobile-first responsive design with breakpoints at 768px
- Code font mixin:
@include code-font
JavaScript
- ES6+ syntax with proper event listeners
- Use
DOMContentLoadedfor initialization - Modern event handling with addEventListener
- No jQuery - vanilla JS preferred
- Scripts in
assets/js/with cache-busting in base.html
Blog Posts (Markdown)
- Format: Kramdown parser with GFM input
- Front matter structure:
--- layout: post title: "Post Title" date: YYYY-MM-DD categories: [Category1, Category2] author: Flemming Bakkensen description: "SEO-friendly description" tags: [tag1, tag2] --- - Use
<!--more-->separator for excerpt - Add emojis to headers:
## 🚀 Introduction - Code blocks with Rouge syntax highlighting
- Include tables, diagrams (Mermaid.js available)
- Target audience: AL developers for Business Central
Naming Conventions
- Posts:
YYYY-MM-DD-title-slug.md - Layouts: kebab-case (base.html, post.html)
- SCSS classes: BEM-like with theme prefixes
- Images: timestamp-based naming in post-specific folders
Error Handling
- Check for YAML front matter syntax errors
- Validate HTML/CSS in generated
_site/directory - Test locally before pushing to GitHub Pages
- Monitor GitHub Actions workflow for build failures
Configuration
_config.yml Key Settings
- Pagination: 5 posts per page
- Plugins: jekyll-feed, jekyll-seo-tag, jekyll-paginate, jekyll-sitemap
- Markdown: Kramdown with Rouge syntax highlighting
- Google Analytics: G-5FQ1BD5CNH (production only)
- Social links: LinkedIn, GitHub, X/Twitter, Bluesky
Tags System
- Tags defined in post front matter:
tags: [tag1, tag2] /tags.htmluses JavaScript for tag cloud and filtering- No manual tag pages needed - auto-generated
Common Tasks
Adding a New Blog Post
- Create
_posts/YYYY-MM-DD-title.md - Add front matter with required fields
- Write content with
<!--more-->separator - Add emojis to headers
- Include code examples with syntax highlighting
- Test locally with
bundle exec jekyll serve --livereload
Modifying the Theme
- Colors/Fonts: Edit
_sass/terminal-theme.scss - Layout structure: Modify
_layouts/base.html - Navigation: Update
_includes/nav.html - Post template: Edit
_layouts/post.html
Build Process
- Jekyll builds to
_site/directory (git-ignored) - GitHub Pages auto-deploys from main branch
- Nightly rebuild via
.github/workflows/nightly-build.yml
Troubleshooting
Common Issues
- Server won’t start: Run
bundle install - Changes not reflecting: Check YAML front matter syntax
- TOC not appearing: Ensure h2-h6 headers exist
- Pagination broken: Verify
paginate: 5in config
Debugging
- Check Jekyll build output for errors
- Use browser DevTools for console errors
- Validate generated HTML in
_site/directory
Do Not Modify
_site/directory (Jekyll build output)Gemfile.lock(unless updating dependencies).github/instructions/playwright.instructions.md(testing rules)