daisy-hook: accept a full "Name: value" header setting, redact the key from logs, retry once; start: brand icons on link and service tiles (trimmed simple-icons + saved favicons, monogram fallback)
All checks were successful
Deploy production / deploy (push) Successful in 1m7s
All checks were successful
Deploy production / deploy (push) Successful in 1m7s
This commit is contained in:
16
scripts/link-icons.ts
Normal file
16
scripts/link-icons.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
// Trims the simple-icons marks used by src/lib/link-icons.ts into src/lib/link-icons.json,
|
||||
// so /start ships a few KB of SVG paths instead of the whole icon set. Run after editing RULES.
|
||||
import { writeFileSync } from 'node:fs';
|
||||
import all from '@iconify-json/simple-icons/icons.json' with { type: 'json' };
|
||||
import { RULES } from '../src/lib/link-icons.ts';
|
||||
|
||||
const icons = (all as { icons: Record<string, { body: string }> }).icons;
|
||||
const out: Record<string, string> = {};
|
||||
for (const r of RULES) {
|
||||
if (!r.si) continue;
|
||||
const icon = icons[r.si];
|
||||
if (!icon) throw new Error(`simple-icons has no "${r.si}"`);
|
||||
out[r.si] = icon.body;
|
||||
}
|
||||
writeFileSync('src/lib/link-icons.json', JSON.stringify(out, null, '\t') + '\n');
|
||||
console.log(`wrote ${Object.keys(out).length} marks`);
|
||||
Reference in New Issue
Block a user