Compare commits

..

No commits in common. "e72c80197bbcb279a43f4eef81d5ed5a7c13d853" and "eaabe1b737e4b2bbad627b2de1ec17e58706b201" have entirely different histories.

10 changed files with 13 additions and 81 deletions

View file

@ -62,13 +62,13 @@ All commands are run from the root of the project, from a terminal:
- [x] A mode to make the site 0 javascript
- [x] Multiple authors via YAML
- [ ] i18n support
- [ ] Integrate with Fediverse w/ activityPub
- [ ] Plain text version when visiting the site via `curl`
- [x] Better support for printing version
- [ ] Add support for more comment engines
- [x] Add support for umami statics
- [ ] Add support for umami statics
- [ ] Improve documentation
- [ ] Release v1.0
- [ ] ~~Integrate with Fediverse w/ activityPub~~
- [ ] ~~Plain text version when visiting the site via `curl`~~
## 👀 Want to learn more?

View file

@ -18,7 +18,6 @@
"@astrojs/sitemap": "^3.3.1",
"@fontsource-variable/jetbrains-mono": "^5.2.5",
"astro": "^5.2.5",
"ico-endec": "^0.1.6",
"sharp": "^0.34.1",
"ultrahtml": "^1.6.0"
},

8
pnpm-lock.yaml generated
View file

@ -29,9 +29,6 @@ importers:
astro:
specifier: ^5.2.5
version: 5.7.10(@azure/identity@4.9.1)(@types/node@22.15.3)(rollup@4.40.1)(typescript@5.8.3)(yaml@2.7.1)
ico-endec:
specifier: ^0.1.6
version: 0.1.6
sharp:
specifier: ^0.34.1
version: 0.34.1
@ -1841,9 +1838,6 @@ packages:
resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==}
engines: {node: '>=10.17.0'}
ico-endec@0.1.6:
resolution: {integrity: sha512-ZdLU38ZoED3g1j3iEyzcQj+wAkY2xfWNkymszfJPoxucIUhK7NayQ+/C4Kv0nDFMIsbtbEHldv3V8PU494/ueQ==}
ieee754@1.2.1:
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
@ -5185,8 +5179,6 @@ snapshots:
human-signals@2.1.0: {}
ico-endec@0.1.6: {}
ieee754@1.2.1: {}
import-meta-resolve@4.1.0: {}

9
public/favicon.svg Normal file
View file

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 128 128">
<path d="M50.4 78.5a75.1 75.1 0 0 0-28.5 6.9l24.2-65.7c.7-2 1.9-3.2 3.4-3.2h29c1.5 0 2.7 1.2 3.4 3.2l24.2 65.7s-11.6-7-28.5-7L67 45.5c-.4-1.7-1.6-2.8-2.9-2.8-1.3 0-2.5 1.1-2.9 2.7L50.4 78.5Zm-1.1 28.2Zm-4.2-20.2c-2 6.6-.6 15.8 4.2 20.2a17.5 17.5 0 0 1 .2-.7 5.5 5.5 0 0 1 5.7-4.5c2.8.1 4.3 1.5 4.7 4.7.2 1.1.2 2.3.2 3.5v.4c0 2.7.7 5.2 2.2 7.4a13 13 0 0 0 5.7 4.9v-.3l-.2-.3c-1.8-5.6-.5-9.5 4.4-12.8l1.5-1a73 73 0 0 0 3.2-2.2 16 16 0 0 0 6.8-11.4c.3-2 .1-4-.6-6l-.8.6-1.6 1a37 37 0 0 1-22.4 2.7c-5-.7-9.7-2-13.2-6.2Z" />
<style>
path { fill: #000; }
@media (prefers-color-scheme: dark) {
path { fill: #FFF; }
}
</style>
</svg>

After

Width:  |  Height:  |  Size: 749 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 18 KiB

View file

@ -1,15 +1,4 @@
---
import Favicon from "../../../assets/favicon.png";
import FaviconSvg from '../../../assets/favicon.svg';
import {getImage} from "astro:assets";
const appleTouchIcon = await getImage({
src: Favicon,
width: 180,
height: 180,
format: 'png'
})
interface Props {
title: string;
description: string;
@ -24,11 +13,6 @@ const canonicalURL = new URL(Astro.url.pathname, Astro.site);
<meta name="title" content={title} />
{author && <meta name="author" content={author} />}
<meta name="description" content={description} />
{/* PWA */}
<link rel="icon" href="/favicon.ico" sizes="32x32" />
<link rel="icon" href={FaviconSvg.src} type="image/svg+xml" />
<link rel="apple-touch-icon" href={appleTouchIcon.src} />
<link rel="manifest" href="/manifest.json" />
{/* Open Graph / Facebook */}
<meta name="og:title" content={title} />
<meta name="og:description" content={description} />

View file

@ -39,6 +39,7 @@ const { title = pageTitle, author = siteConfig.defaultAuthor.name,description =
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="generator" content={Astro.generator} />
<Meta title={pageTitle} author={author} description={description} ogImage={ogImage} />
<title>{pageTitle}</title>

View file

@ -1,17 +0,0 @@
import sharp from 'sharp'
import ico from 'ico-endec'
import path from 'node:path'
// relative to project root
const faviconSrc = path.resolve('src/assets/favicon.svg')
export const GET = async () => {
// resize to 32px PNG
const buffer = await sharp(faviconSrc).resize(32).toFormat('png').toBuffer()
// generate ico
const icoBuffer = ico.encode([buffer])
return new Response(icoBuffer, {
headers: { 'Content-Type': 'image/x-icon' }
})
}

View file

@ -1,34 +0,0 @@
import { getImage } from 'astro:assets'
import favicon from '../assets/favicon.png'
import { siteConfig } from "../config.js";
// thanks to https://kremalicious.com/favicon-generation-with-astro
const faviconPngSizes = [192, 512]
export const GET = async () => {
const icons = await Promise.all(
faviconPngSizes.map(async (size) => {
const image = await getImage({
src: favicon,
width: size,
height: size,
format: 'png'
})
return {
src: image.src,
type: `image/${image.options.format}`,
sizes: `${image.options.width}x${image.options.height}`
}
})
)
const manifest = {
name: siteConfig.title,
description: siteConfig.description,
start_url: '/',
display: 'standalone',
id: 'deadbeef-d7d8-4d48-8a7a-593be33d9f77',
icons
}
return new Response(JSON.stringify(manifest))
}