fixed accessibility

This commit is contained in:
Firq 2025-04-12 19:16:09 +02:00
parent 08b2227b22
commit 805ce53362
Signed by: Firq
GPG key ID: DCE182BA39C697B2
3 changed files with 3 additions and 6 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "@firq/fgosite",
"version": "0.2.0-pre.94",
"version": "0.2.0-pre.95",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@firq/fgosite",
"version": "0.2.0-pre.94",
"version": "0.2.0-pre.95",
"dependencies": {
"@astro-community/astro-embed-youtube": "^0.5.6",
"@astrojs/check": "^0.9.4",

View file

@ -1,7 +1,7 @@
{
"name": "@firq/fgosite",
"type": "module",
"version": "0.2.0-pre.94",
"version": "0.2.0-pre.95",
"private": true,
"scripts": {
"dev": "astro dev",

View file

@ -155,15 +155,12 @@ However, there is one interesting entry there: `urls`. This is a dynamic list of
This is where the magic snippet comes in, which 1. fetches the sitemap, 2. replaces the URLs and 3. fetches each of the URLs once to warm up the `serve` webserver to ensure that the server-caching correctly works (improves the performance by a lot).
```typescript
// 1. fetch sitemap
const sitemap = await (await fetch('http://website:8081/sitemap-0.xml')).text();
// 2. replace URLs
const urls = sitemap.match(/<loc>(.*?)<\/loc>/g)!.map(
(loc) => loc.replace(/<\/?loc>/g, '').replace(/https:\/\/firq.dev/g, 'http://website:8081')
);
// 3. warm up serve
for (const url of urls) { await fetch(url) };
```