Skip to content

Commit

Permalink
feat: respect basePath configuration for favicons
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverlaz committed Dec 12, 2023
1 parent bf94c21 commit aa70621
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/deploy-react-sample-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ on:
- '!**/docusaurus/**'
workflow_dispatch:

concurrency:
cancel-in-progress: true

jobs:
build-and-deploy-sample-apps:
name: Deploy ${{ matrix.application.name }}
Expand Down
14 changes: 8 additions & 6 deletions sample-apps/react/react-dogfood/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
import { Head, Html, Main, NextScript } from 'next/document';

const basePath = process.env.NEXT_PUBLIC_BASE_PATH || '';

export default function Document() {
return (
<Html lang="en">
<Head>
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="shortcut icon" href={`${basePath}/favicon.ico`} />
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/favicon-32x32.png"
href={`${basePath}/favicon-32x32.png`}
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/favicon-16x16.png"
href={`${basePath}/favicon-16x16.png`}
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="/apple-touch-icon.png"
href={`${basePath}/apple-touch-icon.png`}
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="/android-chrome-192x192.png"
href={`${basePath}/android-chrome-192x192.png`}
/>
<link
rel="icon"
type="image/png"
sizes="512x512"
href="/android-chrome-512x512.png"
href={`${basePath}/android-chrome-512x512.png`}
/>
<link
href="https://api.mapbox.com/mapbox-gl-js/v2.15.0/mapbox-gl.css"
Expand Down

0 comments on commit aa70621

Please sign in to comment.