CLAUDE.md — bastianleaf.dev
Role
You are an AI coding assistant helping maintain and extend a personal portfolio and blog site at bastianleaf.dev. The site is built with Jekyll 3.8 and the Hydejack v9 theme, hosted on GitHub Pages.
Your job is to make targeted, minimal changes that follow existing conventions exactly. Do not introduce new patterns, abstractions, or dependencies. When in doubt, match what already exists.
First Steps Before Editing
Before modifying any file:
- Read
_config.ymlto understand global settings, permalink structure, and plugin configuration. - Read the relevant existing content file of the same type (a post if adding a post, a project if adding a project) to understand expected frontmatter structure.
- Check
assets/img/blog/orassets/img/projects/to understand image naming conventions. - Confirm the target folder exists before placing a new file.
- Do not assume what the build system does — verify it in
_config.ymlandGemfile.
Repository Analysis Checklist
Before making changes, confirm:
- Framework: Jekyll 3.8 (
Gemfile) - Theme: Hydejack v9, loaded via
github-pagesgem - Permalink format:
/blog/:categories/:year-:month-:day-:title/(_config.yml) - Active blog category folders: currently only
_posts/git/ - Blog listing page:
posts.mdwithlayout: gridandgrouped: true - Homepage:
index.mdwithlayout: welcome,selected_posts, andselected_projects - Comments enabled globally for all posts via
_config.ymldefaults - Post addons (related, about, etc.) configured in
hydejack.post_addonsin_config.yml - Analytics: Firebase, injected in
_layouts/base.html— do not edit this for content changes - Mermaid diagrams available via
mermaid: truein frontmatter - MathJax available via
kramdown.math_engine: mathjaxin_config.yml
Blog Post Creation Workflow
To add a new blog post:
Choose the category folder. The only existing category is
_posts/git/. Use it if the topic fits. Only create a new subfolder if the topic clearly belongs to a different category.- Name the file following the pattern:
YYYY-MM-DD-kebab-case-slug.md- Lowercase only, hyphens only, no underscores or special characters.
- The date prefix must match the
date:field in frontmatter.
Place the image in
assets/img/blog/before referencing it in frontmatter.Write the frontmatter following the exact structure below.
Write the post body in Markdown below the closing
---.- Optionally feature the post on the homepage by adding its path to
selected_postsinindex.md.
Expected Blog Post Structure
---
layout: post
title: "Title of the Post"
date: YYYY-MM-DD
image:
path: /assets/img/blog/<image-name>.png
srcset:
1920w: /assets/img/blog/<image-name>.png
960w: /assets/img/blog/<image-name>.png
480w: /assets/img/blog/<image-name>.png
description: >
A short description of the post, around 150 characters. Used for SEO.
sitemap: true
---
Post body starts here.
Notes:
- All three
srcsetvalues point to the same image file. This is the established convention in this repo — do not change it. comments:must not appear in individual post frontmatter. It is controlled globally.mermaid: trueis optional and only needed when the post contains Mermaid diagrams.tags: [tag1, tag2]is optional.descriptionis optional but recommended for SEO.
Files Commonly Changed
| Task | Files to change |
|---|---|
| Add a new blog post | _posts/<category>/YYYY-MM-DD-slug.md + image in assets/img/blog/ |
| Add a new project | _projects/<slug>.md + image in assets/img/projects/ |
| Feature a post on homepage | index.md (selected_posts) |
| Feature a project on homepage | index.md (selected_projects) |
| Update site-wide config | _config.yml |
| Update author bio/social | _data/authors.yml |
| Add custom CSS | _sass/my-style.scss |
| Update résumé content | _data/resume.yml |
Files To Avoid Changing
Unless there is a clearly understood, specific reason:
_layouts/base.html— controls the global HTML shell including Firebase Analytics_layouts/post.html,_layouts/project.html— theme layout files_includes/components/*— Liquid components that render posts, projects, etc._includes/body/*,_includes/head/*— injected into every page_sass/hydejack/— Hydejack theme source; changes here may be overwritten or break the theme_sass/pooleparty/— same as above_site/— this is build output; never edit it directlyGemfile— do not add gems without checking GitHub Pages compatibility_data/authors.yml— editing this affects every author byline and the about section on all pages
Code Style Rules
- Use 2-space indentation in YAML frontmatter. Do not use tabs.
- Use
>block scalar for multilinedescriptionvalues. - Keep frontmatter keys aligned where conventional (see existing posts for reference).
- Image paths always begin with
/assets/img/. - Filenames: lowercase, hyphens, no underscores.
- Do not invent new layouts. Use existing ones:
post,project,page,welcome,grid,list. - Do not add inline styles or modify existing component HTML unless fixing a verified rendering issue.
Final Verification Checklist
Before completing any change:
- Frontmatter YAML is valid — no tabs, correct indentation, no unclosed quotes
layoutis set correctly (postfor posts,projectfor projects)dateis inYYYY-MM-DDformattitleis present and quoted if it contains colons or special charactersimage.pathand allsrcsetentries reference a file that actually exists inassets/img/- File is placed in the correct folder with the correct filename format
sitemap: trueis present on public contentcomments:does not appear in individual post frontmatter- No changes were made to
_site/,_sass/hydejack/, or_layouts/base.html bundle exec jekyll buildruns without errors
Response Format After Changes
After completing any change, briefly report:
- What was changed — file path(s) and a one-line description of each change
- What was not changed — confirm which sensitive files were left untouched
- Verification steps taken — which checklist items were confirmed
- Any open questions — if something was unclear or required an assumption, say so explicitly