From 96a9c2593cd7fa55212b964051db4aa767d74423 Mon Sep 17 00:00:00 2001 From: Firq Date: Mon, 21 Oct 2024 22:36:12 +0200 Subject: [PATCH] Updated for Lighthouse --- package.json | 2 +- serve.json | 9 +++++++++ src/layouts/Layout.astro | 7 +++++++ unlighthouse.config.ts | 10 +++++++++- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a536fee..6571c1a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@firq/fgosite", "type": "module", - "version": "0.2.0-pre.12", + "version": "0.2.0-pre.13", "private": true, "scripts": { "dev": "astro dev", diff --git a/serve.json b/serve.json index 06f578d..b50f7b8 100644 --- a/serve.json +++ b/serve.json @@ -17,6 +17,15 @@ "value" : "max-age=31536000" }] }, + { + "source": "**/*.woff2", + "headers": [ + { + "key": "Cache-Control", + "value": "no-cache" + } + ] + }, { "source" : "**/*.@(jpg|jpeg|gif|png|webp|svg)", "headers" : [{ diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 5897289..e355220 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -10,6 +10,10 @@ import ta_collection from 'iconoir/icons/database.svg' import blog from 'iconoir/icons/bookmark-book.svg' import about from 'iconoir/icons/mail.svg' +import workSans500 from '@fontsource/work-sans/files/work-sans-latin-500-normal.woff2?url'; +import workSans600 from '@fontsource/work-sans/files/work-sans-latin-600-normal.woff2?url'; +import workSans700 from '@fontsource/work-sans/files/work-sans-latin-700-normal.woff2?url'; + export interface Props { title: string currentpage: string @@ -71,6 +75,9 @@ const mapped_navdata = navdata.map((item) => ({ + + + diff --git a/unlighthouse.config.ts b/unlighthouse.config.ts index 4d2881a..af23112 100644 --- a/unlighthouse.config.ts +++ b/unlighthouse.config.ts @@ -1,10 +1,18 @@ export default { puppeteerOptions: { - args: ["--no-sandbox", "--disable-setuid-sandbox"], + args: [ + "--no-sandbox", + "--disable-setuid-sandbox" + ], }, ci: { budget: 50, buildStatic: true }, + scanner: { + samples: 3, + device: 'desktop', + sitemap: true, + }, outputPath: "unlighthouse-reports", }