Skip to content

Commit

Permalink
🐛 [PWA] Fix white border around apple icon (#58)
Browse files Browse the repository at this point in the history
* 💬 [Astro] Add some config comments

* 🐛 [PWA] Try to fix white border apple icon
  • Loading branch information
beefchimi authored Jul 22, 2024
1 parent 92887ac commit f509bbb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
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

0 comments on commit f509bbb

Please sign in to comment.