12 KiB
Copilot Instructions for AI Agents
Project Overview
This is aron.petau.net, a multilingual personal portfolio and blog built with:
- Framework: Zola static site generator (v0.19+)
- Theme: Customized Duckquill theme
- Languages: English (default) and German (
.de.mdsuffixed files) - Deployment: Manual build process,
public/directory is version controlled - URL: https://aron.petau.net/
- Source: Hosted on self-hosted Forgejo at https://forgejo.petau.net/aron/awebsite
Architecture & File Structure
Content Layer (content/)
_index.md/_index.de.md- Homepage contentpages/- Static pages (About, CV, Contact, Privacy, etc.)project/- Blog posts and projects, organized by date folders- Format:
YYYY-MM-DD-slug/index.mdandindex.de.md - Each project is self-contained with its own images
- Format:
Template Layer
themes/duckquill/templates/- Base theme templates (DO NOT MODIFY)templates/- Custom template overrides (use this for customization)templates/shortcodes/- Custom shortcodes (gallery, mermaid, skills, timeline)
Style Layer
sass/- Custom SCSS source files (compiled by Zola)themes/duckquill/sass/- Theme SCSS (DO NOT MODIFY)static/css/- Pre-built CSS for shortcodes (gallery, mermaid, skills, timeline)
Static Assets
static/- Raw files copied as-is to output (images, documents, fonts, CSS, JS)static/documents/- PDFs and downloadable filesstatic/images/- Site-wide imagesstatic/css/- Custom CSS for shortcodes
public/- Generated output (version controlled, pushed to server)
Configuration
config.toml- Main Zola configuration- Base URL:
https://aron.petau.net/ - Theme:
duckquill - Features: RSS/Atom feeds, search index, taxonomy (tags)
- Custom styles loaded: timeline, mermaid, skills, gallery
- Base URL:
i18n/de.toml- German translations for UI elements
Critical Workflows
Development
# Serve with live reload on localhost:1111
zola serve
# Build site (output to public/)
zola build
# Run comprehensive tests (build, link checking, etc.)
./scripts/test_site.sh
Content Management
# Create German stubs for all existing English content
./scripts/create_german_stubs.sh
# Update frontmatter across content files
./scripts/add_update_frontmatter.sh
# Organize content (details in script)
./scripts/organize.sh
Content Creation
New Project/Blog Post:
- Create folder:
content/project/YYYY-MM-DD-slug/ - Create
index.md(English) andindex.de.md(German) - Add required frontmatter:
+++ title = "Project Title" authors = ["Aron Petau"] date = 2025-10-06 description = "Brief description" [taxonomies] tags = ["tag1", "tag2"] +++ - Place images in the same directory as the markdown file
- Build and test locally before committing
New Page:
- Create in
content/pages/:pagename.mdandpagename.de.md - Add frontmatter (same structure as above)
- Ensure both language versions have matching content structure
Adding Documents (PDFs, etc.):
- Place in
static/documents/ - Reference as
/documents/filename.pdfin content - DO NOT use external CDN dependencies (Adobe, etc.)
Project-Specific Conventions
Multilingual Content
- Every page must have both
.md(English) and.de.md(German) - Filenames must match exactly (except for language suffix)
- German translations should match English structure and tone
- Use
./scripts/create_german_stubs.shto generate initial German files
Frontmatter Requirements
All markdown files require TOML frontmatter with:
title- Page/post titleauthors- Array, typically["Aron Petau"]date- ISO format (YYYY-MM-DD)description- Brief summary (for SEO and cards)[taxonomies]- tags array[extra]- Optional settings (show_copyright, show_shares, etc.)
Directory Structure Conventions
content/pages/- Static site pagescontent/project/- Blog posts and projects (date-prefixed folders)static/documents/- PDFs and downloadable filesstatic/images/- Site-wide imagesstatic/css/- Shortcode-specific CSS- Project images go in same folder as
index.md
Theme Customization Rules
- NEVER modify
themes/duckquill/directly - Use
templates/for template overrides - Use
sass/for style customizations - Use
static/for additional assets - Theme updates can overwrite changes in
themes/directory
Asset References
- Static files:
/path/from/static/(e.g.,/documents/file.pdf) - Images in same folder:
./image.jpg - Processed images: Zola handles automatically
- External links: Use full URLs with https://
Custom Shortcodes
The site provides four custom shortcodes in templates/shortcodes/:
1. Gallery Shortcode
Creates responsive image galleries with lightbox support.
Location: templates/shortcodes/gallery.html
CSS: static/css/gallery.css
{% gallery() %}
[
{"file": "image1.jpg", "alt": "Description", "title": "Optional Caption"},
{"file": "image2.jpg", "alt": "Description", "title": "Another caption"}
]
{% end %}
Requirements:
- Images must be in the same directory as the content file
- Use
./imagename.jpgfor relative paths - All images must have
alttext for accessibility titleis optional and appears in lightbox
2. Mermaid Shortcode
Renders diagrams using Mermaid.js syntax.
Location: templates/shortcodes/mermaid.html
CSS: static/css/mermaid.css
{% mermaid() %}
graph TD
A[Start] --> B[Process]
B --> C{Decision}
C -->|Yes| D[End]
C -->|No| A
{% end %}
Supported diagrams: flowchart, sequence, class, state, ER, Gantt, pie, etc.
3. Skills Shortcode
Displays categorized skills with optional icons and links.
Location: templates/shortcodes/skills.html
CSS: static/css/skills.css
{% skills() %}
[
{
"name": "Programming",
"skills": [
{"name": "Python", "icon": "fab fa-python", "link": "https://python.org"},
{"name": "JavaScript", "icon": "fab fa-js"}
]
},
{
"name": "Design",
"skills": [
{"name": "Figma"},
{"name": "Adobe XD", "link": "https://adobe.com/xd"}
]
}
]
{% end %}
Properties:
name(required) - Skill nameicon(optional) - FontAwesome classlink(optional) - External URL
4. Timeline Shortcode
Displays chronological events and experiences.
Location: templates/shortcodes/timeline.html
CSS: static/css/timeline.css
{% timeline() %}
[
{
"from": "2025-01",
"to": "2025-12",
"title": "Event Title",
"location": "Berlin, Germany",
"icon": "fas fa-briefcase",
"body": "Description of the event or experience",
"link": "https://example.com"
},
{
"from": "2024-06",
"to": "present",
"title": "Current Position",
"location": "Remote",
"body": "Ongoing work description"
}
]
{% end %}
Properties:
from(required) - Start date (YYYY-MM format)to(required) - End date or "present"title(required) - Event titlelocation(optional) - Physical locationicon(optional) - FontAwesome classbody(optional) - Detailed descriptionlink(optional) - External URL
Build & Deployment Process
Build & Deployment Process
Local Development
-
Serve locally (live reload on port 1111):
zola serve -
Build site (outputs to
public/):zola build -
Run tests (comprehensive validation):
./scripts/test_site.shTests include:
- Build validation
- Link checking (internal and external)
- Markdown linting
- Accessibility checks
Deployment Workflow
- Make content/code changes
- Test locally with
zola serve - Run
zola buildto generatepublic/ - Important:
public/is version controlled - Commit both source files AND generated
public/directory - Push to Forgejo (self-hosted Git)
- Server pulls and serves from
public/
Quality Checks
Before committing:
- Build succeeds without errors
- Both EN and DE versions exist and match structure
- Links are valid (run
./scripts/test_site.sh) - Images have alt text
- Frontmatter is complete and valid
- No external CDN dependencies added
Common Tasks & Examples
Add a new blog post/project
# 1. Create directory
mkdir -p content/project/2025-10-06-my-project
# 2. Create content files
touch content/project/2025-10-06-my-project/index.md
touch content/project/2025-10-06-my-project/index.de.md
# 3. Add images to same directory
cp ~/images/hero.jpg content/project/2025-10-06-my-project/
# 4. Edit markdown files with proper frontmatter
# 5. Test locally
zola serve
# 6. Build and commit
zola build
git add .
git commit -m "Add: My Project blog post"
git push
Add a new static page
# Create both language versions
touch content/pages/newpage.md
touch content/pages/newpage.de.md
# Or use the German stub generator
./scripts/create_german_stubs.sh
Update theme styles
# Add custom SCSS (never edit themes/duckquill/)
nano sass/_custom.scss
# Add to sass/style.scss imports
# Rebuild
zola build
Add a PDF document
# Place in static directory
cp ~/Downloads/document.pdf static/documents/
# Reference in markdown
# Link: [Download PDF](/documents/document.pdf)
Create a gallery in a post
{% gallery() %}
[
{"file": "./hero.jpg", "alt": "Main image", "title": "Project hero image"},
{"file": "./detail1.jpg", "alt": "Detail view"},
{"file": "./detail2.jpg", "alt": "Another detail"}
]
{% end %}
Troubleshooting
Build fails
- Check TOML frontmatter syntax (no smart quotes)
- Ensure all referenced files exist
- Check for unclosed shortcodes
- Run
zola checkfor detailed errors
Links broken
- Use absolute paths for static files (
/documents/file.pdf) - Use relative paths for same-folder images (
./image.jpg) - Run
./scripts/test_site.shto find broken links
German version missing
./scripts/create_german_stubs.sh
Images not showing
- Check image is in same folder as markdown file
- Use
./prefix for relative images in gallery - Ensure proper JSON formatting in gallery shortcode
Styles not applying
- Check
config.tomlextra.styles array includes your CSS - Ensure CSS is in
static/css/notsass/ - Rebuild with
zola build - Clear browser cache
Key Files Reference
| File/Directory | Purpose | Edit? |
|---|---|---|
config.toml |
Main configuration | ✅ Yes |
content/ |
All markdown content | ✅ Yes |
templates/ |
Custom template overrides | ✅ Yes |
sass/ |
Custom SCSS | ✅ Yes |
static/ |
Static assets | ✅ Yes |
themes/duckquill/ |
Base theme | ❌ No - override instead |
public/ |
Generated output | 🤖 Auto-generated, but version controlled |
i18n/de.toml |
German UI translations | ✅ Yes |
scripts/*.sh |
Automation scripts | ✅ Yes |
Integration Points
- Zola CLI: All builds use Zola v0.19+
- Theme: Duckquill (docs)
- Version Control: Self-hosted Forgejo at https://forgejo.petau.net/aron/awebsite
- Hosting: Static files served from
public/directory - Search: Fuse.js with index built by Zola
- Math: KaTeX for equations
- Diagrams: Mermaid.js via custom shortcode
- Icons: FontAwesome (loaded by theme)
Notes for AI Agents
- Always create bilingual content - Every
.mdneeds a.de.md - Never modify theme files directly - Use overrides in
templates/orsass/ - Version control
public/- Unlike typical Zola sites, this project commits build output - No external dependencies - Don't add CDN scripts (Adobe, etc.) - use local files
- Test before committing - Run
./scripts/test_site.sh - Respect existing structure - Projects in date-prefixed folders, pages in
pages/ - Use shortcodes - Gallery, timeline, skills, mermaid for rich content
- Accessibility matters - Always include alt text, proper heading hierarchy
- Check frontmatter - Required fields: title, authors, date, description
For detailed theme documentation, see themes/duckquill/README.md
- Static assets:
static/,public/ - Custom shortcodes:
templates/shortcodes/
For questions or unclear conventions, check theme docs or ask for clarification.