Add OG image, robots.txt

This commit is contained in:
2026-03-22 20:39:31 +01:00
parent 252a6474b3
commit 3adc61b231
5 changed files with 29 additions and 2 deletions

View File

@@ -24,3 +24,14 @@ Starts a PHP dev server on `http://localhost:8888`. Set `PORT` to use a differen
## Deployment
Fonts are cloned from [ebook-fonts](https://github.com/nicoverbruggen/ebook-fonts) during the build phase (see `nixpacks.toml`).
## OG image
The Open Graph image (`public/assets/favicon/og-image.png`) is a 1200x630 PNG screenshot. To regenerate it from a source image:
```bash
magick screenshot.png -strip -resize 1200x630 public/assets/favicon/og-image.png
pngquant --quality=65-80 --strip --force --output public/assets/favicon/og-image.png public/assets/favicon/og-image.png
```
Requires `imagemagick` and `pngquant` (`brew install pngquant`).

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@@ -1,6 +1,10 @@
<?php
define('APP_ROOT', dirname(__DIR__));
require __DIR__ . '/../src/load_fonts.php';
header('X-Content-Type-Options: nosniff');
header('Referrer-Policy: strict-origin-when-cross-origin');
header('Permissions-Policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()');
?>
<!DOCTYPE html>
<html lang="en">
@@ -14,11 +18,11 @@ require __DIR__ . '/../src/load_fonts.php';
<meta property="og:title" content="eBook Fonts Showcase" />
<meta property="og:description" content="Browse and preview fonts from the ebook-fonts collection. Adjust size, line height, dark mode, and more." />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://ebook-fonts.nicoverbruggen.be/assets/favicon/favicon.svg" />
<meta property="og:image" content="https://ebook-fonts.nicoverbruggen.be/assets/favicon/og-image.png" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="eBook Fonts Showcase" />
<meta name="twitter:description" content="Browse and preview fonts from the ebook-fonts collection. Adjust size, line height, dark mode, and more." />
<meta name="twitter:image" content="https://ebook-fonts.nicoverbruggen.be/assets/favicon/favicon.svg" />
<meta name="twitter:image" content="https://ebook-fonts.nicoverbruggen.be/assets/favicon/og-image.png" />
<link rel="icon" type="image/svg+xml" href="assets/favicon/favicon.svg">
<link rel="icon" type="image/png" sizes="96x96" href="assets/favicon/favicon-96x96.png">
<link rel="icon" href="assets/favicon/favicon.ico">

4
public/robots.txt Normal file
View File

@@ -0,0 +1,4 @@
User-agent: *
Allow: /
Sitemap: https://ebook-fonts.nicoverbruggen.be/sitemap.xml

8
public/sitemap.xml Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://ebook-fonts.nicoverbruggen.be/</loc>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
</urlset>