Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [PWA] Fix white border around apple icon #58

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ export default defineConfig({
integrations: [
AstroPWA({
workbox: {
// Not sure how this differs from `includeAssets`...
// globPatterns: ['**/*.{js,css,html,ico,png,svg}'],
// Not sure if we actually want to specify this fallback.
navigateFallback: '/404',
},

// Specify which assets (in addition to the default html/css/js)
// Specify which public assets (in addition to the default html/css/js)
// we want to include in our pre-cache.
// includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'mask-icon.svg'],

Expand Down
Binary file added public/custom-pwa/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion src/layouts/Page.astro
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ const OG_IMAGE = new URL('/assets/dulmage-social.png', Astro.site).href;
<!-- <link rel="icon" href="/favicon.svg" sizes="any" type="image/svg+xml"> -->
<link rel="icon" href="/favicon.ico" sizes="48x48" />
<link rel="icon" href="/favicon.png" sizes="any" type="image/png" />
<link rel="apple-touch-icon" href="/apple-touch-icon-180x180.png" />
<!-- Workaround for `@vite-pwa/assets-generator` adding a thick white border -->
<link
rel="apple-touch-icon"
href="/custom-pwa/apple-touch-icon-180x180.png"
/>

<!-- Open Graph meta -->
<meta property="og:type" content="website" />
Expand Down