Fix manifest icon references and add file reference linter

Manifest fixes:
- Updated all icon references from .png to .svg files
- Changed MIME types from image/png to image/svg+xml
- Removed missing screenshots section
- Fixed HTML favicon references to use SVG files

New reference linter (lint-references.py):
- Validates all file references in HTML and manifest files
- Checks that referenced files actually exist
- Prevents broken links and missing assets
- Integrated into justfile as 'validate-references'
- Added to check-all command for comprehensive validation

Justfile enhancements:
- Added validate-references command
- Updated check-all to include reference validation
- Enhanced validate command with reference checking

Documentation updates:
- Updated CLAUDE.md with reference validation info
- Added file reference checking to code quality standards

This prevents issues where manifest/HTML reference non-existent files,
improving PWA reliability and catching asset mismatches early.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2025-08-18 20:18:51 +02:00
commit 35c7d0bdc9
5 changed files with 179 additions and 31 deletions

View file

@ -10,9 +10,9 @@
<meta name="theme-color" content="#1a1a2e" />
<title>GlitchCraft - Artisanal Text Corruption</title>
<link rel="manifest" href="manifest.json" />
<link rel="icon" type="image/png" sizes="192x192" href="icons/icon-192.png" />
<link rel="icon" type="image/png" sizes="512x512" href="icons/icon-512.png" />
<link rel="apple-touch-icon" href="icons/icon-192.png" />
<link rel="icon" type="image/svg+xml" sizes="192x192" href="icons/icon-192.svg" />
<link rel="icon" type="image/svg+xml" sizes="512x512" href="icons/icon-512.svg" />
<link rel="apple-touch-icon" href="icons/icon-192.svg" />
<link rel="stylesheet" href="styles.css" />
</head>
<body>

View file

@ -9,54 +9,47 @@
"orientation": "portrait-primary",
"icons": [
{
"src": "icons/icon-72.png",
"src": "icons/icon-72.svg",
"sizes": "72x72",
"type": "image/png"
"type": "image/svg+xml"
},
{
"src": "icons/icon-96.png",
"src": "icons/icon-96.svg",
"sizes": "96x96",
"type": "image/png"
"type": "image/svg+xml"
},
{
"src": "icons/icon-128.png",
"src": "icons/icon-128.svg",
"sizes": "128x128",
"type": "image/png"
"type": "image/svg+xml"
},
{
"src": "icons/icon-144.png",
"src": "icons/icon-144.svg",
"sizes": "144x144",
"type": "image/png"
"type": "image/svg+xml"
},
{
"src": "icons/icon-152.png",
"src": "icons/icon-152.svg",
"sizes": "152x152",
"type": "image/png"
"type": "image/svg+xml"
},
{
"src": "icons/icon-192.png",
"src": "icons/icon-192.svg",
"sizes": "192x192",
"type": "image/png",
"type": "image/svg+xml",
"purpose": "any maskable"
},
{
"src": "icons/icon-384.png",
"src": "icons/icon-384.svg",
"sizes": "384x384",
"type": "image/png"
"type": "image/svg+xml"
},
{
"src": "icons/icon-512.png",
"src": "icons/icon-512.svg",
"sizes": "512x512",
"type": "image/png",
"type": "image/svg+xml",
"purpose": "any maskable"
}
],
"categories": ["utilities", "productivity"],
"screenshots": [
{
"src": "screenshots/screenshot1.png",
"type": "image/png",
"sizes": "1280x720"
}
]
"categories": ["utilities", "productivity"]
}