Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
ece39d3
Add image management system design spec
yoghi May 4, 2026
2ec1993
Add image management implementation plan
yoghi May 4, 2026
bd36be5
feat: add event type configuration (epppi, campo-eg, stage)
yoghi May 4, 2026
40960bd
feat: add ambientazione configuration (momo, star-trek, star-wars, mo…
yoghi May 4, 2026
a8d4365
feat: add generic featured image for posts without events
yoghi May 4, 2026
afc4d23
feat: add liquid logic for featured image selection (event_type + amb…
yoghi May 4, 2026
f7d6331
feat: add liquid logic for featured image selection (event_type + amb…
yoghi May 4, 2026
8dcb33e
fix: add backward compatibility for relative featured image paths
yoghi May 4, 2026
b4fc0a2
feat: add liquid logic for volantino selection (event_type + year)
yoghi May 4, 2026
577afe6
feat: add event_type and year to existing event files
yoghi May 4, 2026
7b35857
feat: add placeholder generator script for events and posts
yoghi May 4, 2026
daf698c
Add image specs validation script
yoghi May 4, 2026
a9d4214
feat: add placeholder image check script
yoghi May 4, 2026
e440f07
feat: add image validation job to CI workflow
yoghi May 4, 2026
4b23e72
feat: add image management makefile targets (generate, check, optimize)
yoghi May 4, 2026
1857586
fix: add missing optimize-generic target to match spec
yoghi May 4, 2026
a33b6d3
docs: add comprehensive image creation and optimization guide
yoghi May 4, 2026
a72b4bb
docs: clarify file paths and add mkdir prerequisite in IMAGE_GUIDE
yoghi May 4, 2026
356bd28
test: verify end-to-end image management integration
yoghi May 4, 2026
01d6c35
nuove immagini
yoghi May 4, 2026
18b45e6
feat: convert PNG to JPG during optimize-featured
yoghi May 4, 2026
c3f4ba2
fix: use iteration to check static_files existence
yoghi May 4, 2026
2617687
generic image
yoghi May 4, 2026
d5856f9
docs: add design spec for image/matrices separation
yoghi May 4, 2026
396101b
docs: add implementation plan for image/matrices separation
yoghi May 4, 2026
15e3191
feat: create src/matrici/images/ directory for original images
yoghi May 4, 2026
fbbacb0
feat: add migration script for moving PNG originals to matrici
yoghi May 4, 2026
e935079
fix: add error handling and validation to migration script
yoghi May 4, 2026
b245d4e
feat: add MATRICE_DIR and OPTIMIZE_DIR variables to Makefile
yoghi May 4, 2026
968f8e9
refactor: update optimize-volantini to read from matrices, write to i…
yoghi May 4, 2026
a6304d1
refactor: update optimize-featured to read from matrices, write to im…
yoghi May 4, 2026
f1f0ce1
refactor: update optimize-generic to read from matrices, fallback to …
yoghi May 4, 2026
35d773c
feat: add migrate-images target to Makefile
yoghi May 4, 2026
9c8a04a
feat: add validate-images target to Makefile
yoghi May 4, 2026
af719a6
docs: add migrate-images and validate-images to help target
yoghi May 4, 2026
e48a8ca
refactor: update placeholder generation to use src/matrici/images/
yoghi May 4, 2026
13a568b
refactor: update placeholder check to scan only src/matrici/images/
yoghi May 4, 2026
04ed43b
feat: add validation script for optimized images
yoghi May 4, 2026
0228c19
docs: add Archivio Originali section and update Metodo 1 to use src/m…
yoghi May 4, 2026
61ce351
test: document image matrices separation test results (ImageMagick no…
yoghi May 4, 2026
fdf81b8
docs: add completion checklist for image matrices separation
yoghi May 4, 2026
ce1bfec
migrazione
yoghi May 4, 2026
21f18c3
fix: exclude loghi_branche from migration (small graphics, no optimiz…
yoghi May 4, 2026
3e333cb
fix: remove hardcoded image path from epppi event (use automatic even…
yoghi May 4, 2026
5aab87d
fix: convert software PNG to JPG and exclude pages/ from migration
yoghi May 4, 2026
b22b01f
fix: update loghi_branche references from PNG to JPG
yoghi May 4, 2026
081d8b8
feat: add optimize-loghi target and remove loghi_branche from exceptions
yoghi May 4, 2026
babf2d7
images
yoghi May 5, 2026
de7f5d8
clean
yoghi May 5, 2026
f875b6c
upgrade manage image
yoghi May 5, 2026
f33db0f
fix locandina
yoghi May 5, 2026
639e4f0
fix images
yoghi May 5, 2026
cb72922
fix icon
yoghi May 5, 2026
44ddccc
fix layout
yoghi May 5, 2026
c20c1b8
potenziamneto gestione apple touch icon
yoghi May 5, 2026
4da00ff
fix apple touch image
yoghi May 5, 2026
bcd9b42
update
yoghi May 5, 2026
41413a8
fix
yoghi May 5, 2026
29e13b2
feat: add gitignore for matrici supporto/ directory
yoghi May 8, 2026
df0b7e4
feat: add image management manifest files (.locked and .rules)
yoghi May 8, 2026
39c604f
feat: add optimize-with-manifest.js script
yoghi May 8, 2026
ae14c4b
fix: add defensive programming checks to optimize-with-manifest.js
yoghi May 8, 2026
714074b
feat: add generate-icons-from-svg.js script
yoghi May 8, 2026
4c44821
feat: add init-matrici, generate-icons, optimize-images targets
yoghi May 8, 2026
afd32cb
refactor: update optimize-images.js to use new manifest system
yoghi May 8, 2026
3035434
refactor: update placeholder generation for new matrici structure
yoghi May 8, 2026
a985a29
feat: add SVG source icon for site icon generation
yoghi May 8, 2026
8269b8c
feat: add PWA manifest link to default layout
yoghi May 8, 2026
f5523df
docs: update documentation for image management 2.0
yoghi May 8, 2026
eb486de
refactor: reorganize matrici into production/source-icons/supporto st…
yoghi May 8, 2026
a4c903e
fix: ensure locked files are copied without conversion
yoghi May 8, 2026
66969b1
docs: add migration guide for image management 2.0
yoghi May 8, 2026
0175ca1
ci: add matrici sync check to PR validation
yoghi May 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y make imagemagick

- name: Optimize images from matrici
run: |
make optimize-images

- name: Build the site in the jekyll/builder container
run: |
docker run \
Expand Down
123 changes: 123 additions & 0 deletions .github/workflows/validate-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,126 @@ jobs:
echo "❌ HTML found in markdown files"
exit 1
fi

check-generated-images:
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- uses: actions/checkout@v4

- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y make imagemagick

- name: Generate images from matrici
run: |
make optimize-images

- name: Check if assets/images needs update
id: check-images
run: |
if [[ -n "$(git diff src/jekyll/assets/images/)" ]]; then
echo "❌ Generated images are out of sync with matrici"
echo "Run 'make optimize-images' and commit the changes"
git diff --stat src/jekyll/assets/images/
exit 1
else
echo "✅ Generated images are in sync with matrici"
fi

- name: Comment on PR if images out of sync
if: failure() && steps.check-images.outcome == 'failure'
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '❌ **Images Out of Sync**\n\n' +
'Le immagini in `src/jekyll/assets/images/` non sono sincronizzate con `src/matrici/images/`.\n\n' +
'**Soluzione:**\n' +
'```bash\n' +
'make optimize-images\n' +
'git add src/jekyll/assets/images/\n' +
'git commit -m "chore: regenerate optimized images"\n' +
'```\n\n' +
'Questo genererà le immagini ottimizzate dalle matrici.'
})

check-image-placeholders:
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: |
cd scripts
npm install

- name: Check image placeholders
id: check-placeholders
run: |
cd scripts
node check-image-placeholders.js

- name: Validate image specs
id: validate-specs
run: |
cd scripts
node validate-image-specs.js

- name: Comment on PR if issues found
if: failure()
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '❌ **Image Issues Found**\n\n' +
'Sostituisci placeholder o correggi specifiche:\n' +
'- **Volantini**: 3508×4961px (A3), max 500KB\n' +
'- **Featured**: 1200×630px (16:9), max 200KB\n\n' +
'Vedi log per dettagli completi.\n\n' +
'📖 Guida: docs/IMAGE_GUIDE.md'
})

check-matrici-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check matrici → assets sync
run: |
node scripts/check-matrici-sync.js

- name: Comment on PR if out of sync
if: failure()
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '❌ **Matrici/Images Out of Sync**\n\n' +
'Le immagini in src/matrici/images/ non sono sincronizzate con src/jekyll/assets/images/\n\n' +
'**Soluzione:**\n' +
'```bash\n' +
'make optimize-images\n' +
'git add src/jekyll/assets/images/\n' +
'git commit -m "chore: sync assets from matrici"\n' +
'```\n\n' +
'Vedi docs/IMAGE_GUIDE.md per dettagli'
})
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ src/node_modules/
src/output/
src/vendor/

# Generated images from matrici (run make optimize-images to regenerate)
src/jekyll/assets/images/

# Old accessibility reports location (now in output/accessibility/)
docs/accessibility/reports/
src/jekyll/.jekyll-cache/
59 changes: 57 additions & 2 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,64 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]


### Added
- Project structure reorganization
- Image management system with matrici (source repository)
- src/matrici/images/ for original PNG sources
- src/jekyll/assets/images/ as generated cache (not in git)
- Automatic optimization pipeline: PNG → JPG with size constraints
- Multi-size generation from single source (apple-touch-icon)
- Placeholder generation with protection against overwriting real images
- make optimize-images target for automatic image processing
- Copy software logos (PNG with transparency)
- Copy branch logos (PNG with transparency)
- Generate apple-touch-icon sizes (72x72, 114x114, 144x144) from single source
- Optimize volantini (A3 @ 300DPI, 3508x4961)
- Optimize featured images (16:9, 1200x630)
- make generate-placeholders for missing images
- Creates 1px red PNG placeholders for missing event/featured images
- Protection against overwriting real images (> 1KB)
- Force mode with --force flag
- CI/CD integration for image optimization
- Automatic image generation during release workflow
- ImageMagick installed in CI for resize operations
- PR validation for generated images sync
- .gitignore update for src/jekyll/assets/images/ (generated cache)

### Changed
- Image workflow from manual to automated
- Old: Manual optimization, JPG in git
- New: PNG sources in matrici, automatic generation, git-ignored cache
- apple-touch-icon management
- Old: Multiple size files manually maintained
- New: Single high-res source, automatic multi-size generation
- Dimension validation (minimum 144x144, recommends 512x512)
- HTML layout for apple-touch-icon
- Added explicit links for all sizes (72x72, 114x114, 144x144)
- Ensures iOS devices use correct resolution

### Fixed
- JPG conversion breaking PNG transparency
- Software logos now copied as PNG (transparency preserved)
- Branch logos now copied as PNG (transparency preserved)
- Apple-touch-icon generated as PNG (not JPG)
- Missing image generation for campo-eg locandina
- Fixed optimize-volantini to handle both PNG and JPG placeholders
- generate-placeholders now creates PNG (not JPG)
- Placeholder generation overwriting real images
- Added dimension check (> 1KB = real image, skip)
- Added --force flag to override protection when needed
- Image dimension validation
- apple-touch-icon source validated for minimum 144x144
- Warning if upsampling required (quality degradation risk)

### Removed
- Manual image optimization workflow
- Multiple redundant image files in git
- Software logo JPG versions (replaced with PNG generation)
- Branch logo JPG versions (replaced with PNG generation)
- Individual apple-touch-icon sizes (replaced with single source)

### Project structure reorganization
- All source files moved to src/ subdirectories (src/jekyll/, src/tailwind/, src/docker/)
- New output/ directory for generated content (output/_site/, output/screenshots/)
- Clear separation between source code and build artifacts
Expand Down
Loading
Loading