feat: Add favicon and update icon and manifest paths to use file conventions and a consistent BASE_PATH.

This commit is contained in:
Sean O'Connor
2026-02-03 18:47:00 -05:00
parent 1fec6dd607
commit 1710f55ceb
5 changed files with 6 additions and 10 deletions

View File

@@ -67,7 +67,7 @@ jobs:
env: env:
NEXT_PUBLIC_UMAMI_SCRIPT_URL: ${{ secrets.NEXT_PUBLIC_UMAMI_SCRIPT_URL }} NEXT_PUBLIC_UMAMI_SCRIPT_URL: ${{ secrets.NEXT_PUBLIC_UMAMI_SCRIPT_URL }}
NEXT_PUBLIC_UMAMI_WEBSITE_ID: ${{ secrets.NEXT_PUBLIC_UMAMI_WEBSITE_ID }} NEXT_PUBLIC_UMAMI_WEBSITE_ID: ${{ secrets.NEXT_PUBLIC_UMAMI_WEBSITE_ID }}
NEXT_PUBLIC_BASE_PATH: /lewisburg-coffee BASE_PATH: /lewisburg-coffee
- name: Upload artifact - name: Upload artifact
uses: actions/upload-pages-artifact@v3 uses: actions/upload-pages-artifact@v3
with: with:

View File

@@ -7,7 +7,7 @@ import "./src/env.js";
/** @type {import("next").NextConfig} */ /** @type {import("next").NextConfig} */
const config = { const config = {
output: "export", output: "export",
basePath: process.env.NEXT_PUBLIC_BASE_PATH || undefined, basePath: process.env.BASE_PATH || undefined,
images: { images: {
unoptimized: true, unoptimized: true,
}, },

BIN
src/app/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

View File

@@ -10,7 +10,7 @@ import { env } from "~/env";
export const metadata: Metadata = { export const metadata: Metadata = {
title: "Lewisburg Coffee Map", title: "Lewisburg Coffee Map",
description: "Interactive map of coffee shops in Lewisburg, PA", description: "Interactive map of coffee shops in Lewisburg, PA",
icons: [{ rel: "icon", url: "/favicon.ico" }], // icons are automatically handled by file conventions in src/app/
}; };
export const viewport: Viewport = { export const viewport: Viewport = {

View File

@@ -3,24 +3,20 @@ import { type MetadataRoute } from 'next';
export const dynamic = 'force-static'; export const dynamic = 'force-static';
export default function manifest(): MetadataRoute.Manifest { export default function manifest(): MetadataRoute.Manifest {
const basePath = process.env.BASE_PATH ?? '';
return { return {
name: 'Lewisburg Coffee Map', name: 'Lewisburg Coffee Map',
short_name: 'Coffee Map', short_name: 'Coffee Map',
description: 'Find the best coffee in Lewisburg, PA', description: 'Find the best coffee in Lewisburg, PA',
start_url: '/', start_url: `${basePath}/`,
display: 'standalone', display: 'standalone',
background_color: '#ffffff', background_color: '#ffffff',
theme_color: '#8B4513', theme_color: '#8B4513',
icons: [ icons: [
{ {
src: '/favicon.ico', src: `${basePath}/favicon.ico`,
sizes: 'any', sizes: 'any',
type: 'image/x-icon', type: 'image/x-icon',
},
{
src: '/icon.svg',
sizes: 'any',
type: 'image/svg+xml',
} }
], ],
}; };