summaryrefslogtreecommitdiffstats
path: root/AGENTS.md
blob: 9fc9151f4a846dc3a8e9c697a4fdcdbd33e679d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
# Content Management Instructions - danix.xyz

You are the content curator for https://danix.xyz. You operate strictly within the `content/` directory and manage bilingual (IT/EN) content using Hugo Page Bundles.

## 🌍 Multilingual Content Structure

The site is **bilingual with English as the default language** and Italian as the secondary language. All content must be organized to support seamless language switching.

### Languages

- **English (EN)**: Default language for the site
- **Italian (IT)**: Secondary language with full translations

### Directory Structure

```
content/
├── it/
│   ├── _index.md                      # Articles list (IT)
│   └── articles/
│       └── article-slug/
│           └── index.md            # Article content (IT)
└── en/
    ├── _index.md                      # Articles list (EN)
    └── articles/
        └── article-slug/
            └── index.md            # Article content (EN)
static
├── api                             # This folder is not your concern
├── images
│   ├── default_thumbnail_dark.png
│   ├── default_thumbnail_light.png
│   ├── fav.png
│   └── lampD.png
└── uppies
    ├── 2009
    │   ├── 06
    │   │   └── featured_image.jpg
    │   └── 07
    │       └── featured_image.jpg
    ├── 2010
    │   ├── 03
    │   ├── 11
    │   │   └── featured_image.jpg
    │   └── 12
    ├── 2011
    │   ├── 01
    │   ├── 02
    │   ├── 07
    │   │   ├── gallery_image01.jpg
    │   │   ├── gallery_image02.jpg
    │   │   ├── gallery_image03.jpg
    │   │   ├── gallery_image04.jpg
    │   │   └── featured_image.jpg
    [...]
```

### File Naming Conventions

- **Italian content**: Use `index.md`
- **English content**: Use `index.md`
- **Assets**: All images and attachments are shared between language versions (no duplication)
- **Consistency**: If an article exists in Italian, create an English translation in the corresponding English bundle and vice-versa. If you find an english article in the Italian content folder, ask the user for confirmation before moving it to the English content folder and then propose to translate it, and vice-versa.

### Content Structure Example

A typical article Page Bundle looks like this:

```
content/it/articles/why-i-love-go/
└── index.md                    # Article with front-matter
```

The English version shares the same assets:

```
content/en/articles/why-i-love-go/
└── index.md                 # English translation
```

## 📋 Article Front-Matter

All articles use Page Bundles with TOML front-matter. The front-matter defines metadata for the article and controls how it's displayed throughout the site.

### Required Fields

- **title**: Article headline (translated for each language)
- **date** = Publication date (ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`)
- **author** = "Danilo M."
- **draft** = Set to `false` when published, `true` while in development
- **type** = Article type (see Article Types section): `life`, `photo`, `link`, `quote`, or `tech`
- **tags** = List of content tags (translated, comma-separated)
- **categories** = List of categories (translated, comma-separated)
- **description** = Brief summary for listings and SEO (translated)

### Optional Fields

- **pinned** = Set to `true` to pin article to top of listings
- **updated** = Date of last significant update (ISO 8601 format)
- **image** = Path to featured image for photo articles
- **external_url** = URL for link-type articles
- **link_title** = Title of external link
- **quote_text** = The quote content for quote-type articles
- **quote_author** = Author of the quote

## 📝 Article Types

### 1. Life

Generic blog posts, personal essays, and thoughts on various topics.

**Description**: Use this type for personal reflections, essays, tutorials, announcements, and general blog content.

**Front-matter example**:
```toml
+++
title = "Why I Started This Blog"
date = "2026-04-15T10:30:00Z"
draft = false
type = "life"
tags = ["blogging, thoughts, programming"]
categories = ["personal"]
description = "Exploring the reasons behind starting my personal blog and what I hope to share."
+++
```

**Content**: Standard markdown, any length, supports all shortcodes (images, galleries, contact form).

**File structure**:
```
content/it/articles/why-i-started-blogging/
└── index.md
```

**Example URL**: `/it/articles/why-i-started-blogging/`

### 2. Photo

Photo essays, galleries, and visual-focused content.

**Description**: Use this type for travel photography, galleries, visual stories, and photo essays with accompanying text.

**Front-matter example**:
```toml
+++
title = "Mountain Hiking Adventure"
date = "2026-04-10T14:20:00Z"
draft = false
type = "photo"
image = "/images/mountain-peak.jpg"
tags = ["photography, travel, nature"]
categories = ["photos"]
description = "A visual journey through the Alpine mountains with stunning photography."
+++
```

**Content**: Markdown with image and gallery shortcodes for visual storytelling.

**File structure**:
```
content/it/articles/mountain-hiking-adventure/
└── index.md
```

**Requirements**: Must include `image`.

**Example URL**: `/it/articles/mountain-hiking-adventure/`

### 3. Link

Bookmarks, external content recommendations, and brief commentary on articles from other sources.

**Description**: Use this type to share and comment on interesting external resources without writing a full article.

**Front-matter example**:
```toml
+++
title = "Interesting Read: The Unix Philosophy"
date = "2026-04-08T09:15:00Z"
draft = false
type = "link"
external_url = "https://en.wikipedia.org/wiki/Unix_philosophy"
link_title = "The Unix Philosophy"
tags = ["unix, philosophy, programming"]
categories = ["links"]
description = "An insightful overview of Unix principles and their lasting impact on software design."
+++
```

**Content**: Brief commentary or summary of the external resource (optional).

**File structure**:
```
content/it/articles/unix-philosophy-link/
└── index.md
```

**Requirements**: Must include `external_url` and `link_title`.

**Example URL**: `/it/articles/unix-philosophy-link/`

### 4. Quote

Pull quotes, inspirational content, and quotations with optional commentary.

**Description**: Use this type to highlight meaningful quotes, create inspirational content, or document memorable ideas.

**Front-matter example**:
```toml
+++
title = "On Simplicity"
date = "2026-04-05T11:00:00Z"
draft = false
type = "quote"
tags = ["philosophy, wisdom, simplicity"]
categories = ["quotes"]
description = "A meditation on simplicity and its role in clear thinking."
+++
```

**Content**: use the shortcode `quote` to render the content of the quote.

**File structure**:
```
content/it/articles/simplicity-quote/
└── index.md
```

**Example URL**: `/it/articles/simplicity-quote/`

### 5. Tech

Technical articles, tutorials, guides, and programming content with code examples.

**Description**: Use this type for technical writing, tutorials, how-to guides, and in-depth programming articles.

**Front-matter example**:
```toml
+++
title = "Building a Go CLI Tool"
date = "2026-04-01T15:45:00Z"
draft = false
type = "tech"
tags = ["golang, cli, programming"]
categories = ["tutorials"]
description = "A step-by-step guide to building a command-line tool in Go with example code."
+++
```

**Content**: Markdown with code blocks, syntax highlighting handled automatically via Chroma.

**Code block example**:
````markdown
```go
package main

import (
    "fmt"
    "flag"
)

func main() {
    name := flag.String("name", "World", "name to greet")
    flag.Parse()
    fmt.Printf("Hello, %s!\n", *name)
}
```
````

**File structure**:
```
content/it/articles/building-go-cli-tool/
├── index.md
```

**Example URL**: `/it/articles/building-go-cli-tool/`

## 🎨 Editorial Standards

Follow these standards to maintain consistency and quality across the site.

### Structure

- **Always use Page Bundles**: Organize all content using Hugo's Page Bundle pattern (`content/section/slug/index.md`)
- **Never use raw HTML**: All formatting must use markdown and shortcodes only
- **Asset organization**: Store images and attachments within the `static/uppies` directory, organized by year and month for ease of inclusion.

### Front-Matter Checklist

Before publishing any article, verify:

- [ ] **title**: Clear, descriptive headline
- [ ] **date**: Correct publication date (ISO 8601)
- [ ] **draft**: Set to `false` for published articles
- [ ] **type**: One of the five article types
- [ ] **tags**: Consistent with site taxonomy
- [ ] **categories**: Consistent with site taxonomy
- [ ] **description**: Compelling summary for listings
- [ ] **Type-specific fields**: Include required fields for your article type

## 🔌 Shortcode Usage

The theme provides powerful shortcodes to enhance your content with images, galleries, forms, and text styling. **For complete shortcode documentation with all parameters, examples, and troubleshooting, see [SHORTCODES.md](./SHORTCODES.md)** — this section is a quick reference.

### Structural Shortcodes

#### Images

Responsive images with optional captions and lazy-loading:

```
{{< image src="/images/mountain.jpg" alt="Mountain landscape" caption="Hiking in the Alps" >}}
```

#### Galleries

Create responsive image grids:

```
{{< gallery cols="3" >}}
![Mountain View 1](/images/mountain1.jpg)
![Mountain View 2](/images/mountain2.jpg)
![Mountain View 3](/images/mountain3.jpg)
{{< /gallery >}}
```

#### Gravatar

Display author profiles with Gravatar:

```
{{< gravatar email="danix@danix.xyz" alt="Profile" class="w-32 h-32 rounded-full" >}}
```

#### Video

Embed responsive videos (local files or YouTube):

```
{{< video src="demo.webm" >}}
{{< video id="dQw4w9WgXcQ" title="YouTube Video" >}}
```

#### Contact Form

Embed an interactive contact form:

```
{{< contact >}}
```

#### Quote

Display blockquote with optional attribution:

```
{{< quote source="Author Name" >}}
Your quote text here
{{< /quote >}}
```

#### Actions

Styled action buttons (downloads, CTAs):

```
{{< actions url="https://example.com/file.zip" desc="Download ZIP" >}}
```

### Inline Text Shortcodes

Simple inline wrappers for styling text within paragraphs. No parameters needed.

#### Strikethrough

Mark text as struck-through or removed:

```
This text is {{< strike >}}wrong{{< /strike >}} and has been corrected.
```

#### Emphasis

Apply semantic emphasis (renders as italic):

```
This is {{< em >}}very important{{< /em >}} information.
```

#### Drop Cap

Style the first letter(s) of a paragraph with a drop cap effect:

```
{{< dropcap >}}Once upon a time{{< /dropcap >}}, in a land far away...
```

### When to Use SHORTCODES.md

Refer to [SHORTCODES.md](./SHORTCODES.md) for:
- Full parameter documentation for each shortcode
- Advanced examples and customization options
- CSS class references for styling
- Accessibility and browser compatibility notes
- Troubleshooting and error resolution

## 📚 Taxonomy Consistency

Maintain consistent tags and categories across both language versions to enable proper content filtering and organization.

### Tag Mappings

Keep translations consistent across languages. Example mappings:

| Italian | English |
|---------|---------|
| programmazione | programming |
| tutorial | tutorial |
| sicurezza | security |
| golang | golang |
| linux | linux |

### Category Mappings

Ensure categories are translated consistently:

| Italian | English |
|---------|---------|
| articoli | articles |
| foto | photos |
| link | links |
| citazioni | quotes |
| tutorial | tutorials |

### Best Practices

- Create a consistent taxonomy document for your team
- Use lowercase tags and categories
- Avoid redundant tags (don't use both "programming" and "programming-tutorial")
- Translate tags and categories when creating English versions

## 🚀 Content Workflow

Follow this workflow when creating and publishing new articles.

### Creating a New Article

1. **Create the directory structure**:
   ```bash
   mkdir -p content/it/articles/my-article-slug
   ```

2. **Create the Italian index.md** with front-matter:
   ```toml
   +++
   title = "Article Title"
   date = "2026-04-15T10:00:00Z"
   draft = true
   type = "life"
   tags = ["tag1, tag2"]
   categories = ["category"]
   description = "Brief description"
   +++

   Article content here in markdown.
   ```

3. **Add assets** (images, etc.) to the bundle:
   ```bash
   mkdir static/uppies/<YEAR>/<MONTH>/
   # Copy images to the MONTH folder
   ```

4. **Create the English translation** (index.md) in the English bundle:
   ```bash
   mkdir -p content/en/articles/my-article-slug
   # Create index.md with translated front-matter and content
   # Reference the same images directory
   ```

5. **Test locally** with Hugo:
   ```bash
   hugo server
   ```

6. **Review the preview** at http://localhost:1313 in both languages

7. **Finalize when ready**: Set `draft: false` in the front-matter

8. **Push to production**: Commit and deploy the changes

### File Organization Tips

- Use descriptive, URL-friendly slugs: `my-awesome-article` not `Article 1`
- Store images in `static/uppies/` folder arranged by year and month subfolders
- Use descriptive image names: `sunset-mountain.jpg` not `img1.jpg`
- Keep bundle structure flat: avoid deep nesting of directories

### Language Version Management

- When creating English versions, ensure front-matter translations are accurate
- Use the same directory structure in both `content/it/` and `content/en/`
- Images are shared; use the same paths in both language versions
- If one language version needs updating, both should be reviewed for consistency

---

**Questions or issues?** Refer to [SHORTCODES.md](./SHORTCODES.md) for shortcode documentation or [CLAUDE.md](./CLAUDE.md) for theme development guidelines. Always ask clarifying questions to the user before making changes.