feat: inject Open Graph meta tags into share page for social previews
Tim Falken authored 6 months ago
- Add buildShareOpenGraphPage() to server/routes/share.js
- Reads share.html template and injects OG/Twitter meta tags
- og:image + summary_large_image for image files (jpg/jpeg/png/gif/webp/avif/bmp)
- 'Link Expired' title/description for expired tokens
- 'Link Not Found' for unknown tokens
- og:description includes file type and remaining validity
- Update GET /share/:token in server/index.js to use the new function
- Works for all visitors: crawlers get OG data, browsers get full interactive page
- Browser tab title now shows filename instead of generic 'Shared file'
- Add 11 tests covering all scenarios in share.routes.test.js
- Update technical-reference.md and tests.md