Files
Website/nginx-blazor.conf
SysAdmin 3aa191cd3d feat: Convert website from static HTML to .NET 9.0 Blazor Web App
Major architectural upgrade from static HTML site to modern Blazor Web App:

- Migrated to .NET 9.0 Blazor Web App framework
- Converted home page with 4 gateway cards (Help Desk, App Store, Cloud, SDK)
- Added new SDK card linking to comprehensive SDK documentation
- Converted SDK documentation page to Blazor component
- Updated template download links to nuget.silverlabs.uk repository
- Implemented multi-stage Docker build with .NET SDK 9.0
- Created Blazor-optimized nginx configuration
- Preserved all original styling and animations
- Added .gitignore for Blazor build artifacts

Technical changes:
- New BlazorApp/ project structure with Components architecture
- MainLayout simplified (no default navigation)
- CSS ported to wwwroot (styles.css + sdk-styles.css)
- Multi-stage Dockerfile: Build with dotnet SDK, serve with nginx
- GitLab CI/CD pipeline compatible (auto-detects new Dockerfile)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 19:11:53 +01:00

42 lines
1.1 KiB
Plaintext

server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# Enable gzip compression
gzip on;
gzip_types text/css application/javascript application/json image/jpeg image/png application/wasm;
gzip_min_length 1000;
# Cache static assets
location ~* \.(jpg|jpeg|png|gif|ico|css|js|wasm|json)$ {
expires 1h;
add_header Cache-Control "public, max-age=3600";
}
# Blazor framework files - longer cache
location /_framework/ {
expires 1y;
add_header Cache-Control "public, max-age=31536000, immutable";
}
# MIME types for Blazor WebAssembly
types {
application/wasm wasm;
application/octet-stream dll;
application/json json;
}
# Main location - support client-side routing
location / {
try_files $uri $uri/ /index.html;
}
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
}