make it deployable to github pages and fix npm run test errors

This commit is contained in:
2025-11-21 23:32:21 +01:00
parent ba386f8bc7
commit 24fac79ea2
6 changed files with 29 additions and 7 deletions

View File

@@ -3,6 +3,11 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lumina - A Modern Nostr Client</title>
<meta name="description" content="A modern Nostr client application built with React, TailwindCSS, and Nostrify." />
<meta property="og:type" content="website" />
<meta property="og:title" content="Lumina - A Modern Nostr Client" />
<meta property="og:description" content="A modern Nostr client application built with React, TailwindCSS, and Nostrify." />
<meta http-equiv="content-security-policy" content="default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; frame-src 'self' https:; font-src 'self'; base-uri 'self'; manifest-src 'self'; connect-src 'self' blob: https: wss:; img-src 'self' data: blob: https:; media-src 'self' https:">
<link rel="manifest" href="/manifest.webmanifest">
</head>

View File

@@ -0,0 +1,21 @@
{
"name": "Lumina",
"short_name": "Lumina",
"description": "A modern Nostr client application",
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#000000",
"icons": [
{
"src": "/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}

View File

@@ -7,7 +7,7 @@ import NotFound from "./pages/NotFound";
export function AppRouter() {
return (
<BrowserRouter>
<BrowserRouter basename={import.meta.env.BASE_URL}>
<ScrollToTop />
<Routes>
<Route path="/" element={<Index />} />

View File

@@ -7,9 +7,6 @@ import { ErrorBoundary } from '@/components/ErrorBoundary';
import App from './App.tsx';
import './index.css';
// FIXME: a custom font should be used. Eg:
// import '@fontsource-variable/<font-name>';
createRoot(document.getElementById("root")!).render(
<ErrorBoundary>
<App />

View File

@@ -1,7 +1,5 @@
import { useSeoMeta } from '@unhead/react';
// FIXME: Update this page (the content is just a fallback if you fail to update the page)
const Index = () => {
useSeoMeta({
title: 'Welcome to Your Blank App',

View File

@@ -4,7 +4,8 @@ import react from "@vitejs/plugin-react-swc";
import { defineConfig } from "vitest/config";
// https://vitejs.dev/config/
export default defineConfig(() => ({
export default defineConfig(({ mode }) => ({
base: mode === 'production' && process.env.GITHUB_ACTIONS ? '/mkstack-onboarding-tool/' : '/',
server: {
host: "::",
port: 8080,