Files
blitzkit/packages/website/astro.config.ts
T

82 lines
2.4 KiB
TypeScript
Raw Normal View History

2025-09-27 15:51:46 -05:00
import react from "@astrojs/react";
import { wrapper } from "@blitzkit/i18n";
import locales from "@blitzkit/i18n/locales.json";
2025-09-27 15:38:37 -05:00
import strings from "@blitzkit/i18n/strings/en.json";
2025-09-27 15:51:46 -05:00
import { mauve, mauveDark } from "@radix-ui/colors";
2025-09-27 15:38:37 -05:00
import AstroPWA from "@vite-pwa/astro";
import favicons from "astro-favicons";
import { defineConfig } from "astro/config";
2025-09-27 15:51:46 -05:00
import packageJSON from "../../package.json";
2025-09-27 15:38:37 -05:00
import { tools } from "./src/constants/tools";
export default defineConfig({
devToolbar: { enabled: false },
integrations: [
favicons({
name: strings.common.name,
short_name: strings.common.name,
background: mauveDark.mauve1,
themes: [mauve.mauve1, mauveDark.mauve1],
appleStatusBarStyle: "black-translucent",
2025-09-27 15:51:46 -05:00
version: packageJSON.version,
2025-09-27 15:38:37 -05:00
shortcuts: Object.values(tools)
.filter((tool) => !tool.disabled && !tool.href)
.map((tool) => {
const stringId = (tool.strings ??
tool.id) as keyof typeof strings.website.tools;
return {
name: strings.website.tools[stringId].name,
name_localized: wrapper(
(strings) => strings.website.tools[stringId].name
),
description: strings.website.tools[stringId].description,
description_localized: wrapper(
(strings) => strings.website.tools[stringId].description
),
short_name: strings.website.tools[stringId].name,
short_name_localized: wrapper(
(strings) => strings.website.tools[stringId].name
),
url: `/${tool.id}`,
};
}),
manifest: {
2025-09-27 15:51:46 -05:00
description: strings.website.home.seo_description,
description_localized: wrapper(
(strings) => strings.website.home.seo_description
),
dir: "ltr",
categories: ["utilities", "games", "developer", "developer tools"],
id: "com.tresabhi.blitzkit",
2025-09-27 15:38:37 -05:00
start_url: "/",
2025-09-27 15:51:46 -05:00
launch_handler: { client_mode: "navigate-new" },
2025-09-27 15:38:37 -05:00
display: "fullscreen",
display_override: ["fullscreen", "standalone", "minimal-ui"],
2025-09-27 15:51:46 -05:00
lang: locales.default,
orientation: "any",
2025-09-27 15:38:37 -05:00
},
icons: {
windows: true,
android: true,
appleIcon: true,
appleStartup: true,
favicons: true,
yandex: true,
},
}),
AstroPWA({ manifest: false }),
react(),
],
});