diff --git a/package-lock.json b/package-lock.json index 2f7a013..735dc6d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 61349fc..b63dc33 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/data/blog/unlighthouse.md b/src/data/blog/unlighthouse-ci.md similarity index 99% rename from src/data/blog/unlighthouse.md rename to src/data/blog/unlighthouse-ci.md index ebe3739..aaf7a68 100644 --- a/src/data/blog/unlighthouse.md +++ b/src/data/blog/unlighthouse-ci.md @@ -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) }; ```