Skip to content

Commit

Permalink
Merge pull request #39 from SaqibSyed1014/pwa
Browse files Browse the repository at this point in the history
Pwa
  • Loading branch information
SaqibSyed1014 authored Sep 10, 2024
2 parents ad8b696 + d1c9050 commit 84e2afb
Show file tree
Hide file tree
Showing 8 changed files with 4,899 additions and 3,381 deletions.
40 changes: 24 additions & 16 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (host?.includes('servehub.io') || host?.includes('devweb') || host?.includes
}
]
})
}
useHead({
Expand Down Expand Up @@ -88,9 +88,8 @@ function assignPageMetaInfo(metaData :MetaData) {

<template>
<Html lang="en-US">
<Body
class="bg-gray-25 text-gray-900 antialiased transition-colors duration-300"
>
<VitePwaManifest />
<Body class="bg-gray-25 text-gray-900 antialiased transition-colors duration-300">
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
Expand Down
21 changes: 21 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[build]
publish = "dist"
command = "pnpm run build"

[[redirects]]
from = "/*"
to = "/index.html"
status = 200

[[headers]]
for = "/manifest.webmanifest"
[headers.values]
Content-Type = "application/manifest+json"

[[headers]]
for = "/assets/*"
[headers.values]
cache-control = '''
max-age=31536000,
immutable
'''
33 changes: 32 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default defineNuxtConfig({
{ property: 'og:image', content: 'https://assets.servehub.io/images/og-logo.png' },
{ property: 'og:url', content: 'https://www.servehub.io' },
{ property: 'og:type', content: 'website' },
{ name: 'theme-color', content: '#099250' }
]
}
},
Expand Down Expand Up @@ -56,8 +57,38 @@ export default defineNuxtConfig({
'nuxt-swiper',
'nuxt-svgo',
'@pinia/nuxt',
'nuxt-lodash'
'nuxt-lodash',
'@vite-pwa/nuxt'
],
pwa: {
mode: 'development',
registerType: 'autoUpdate',
manifest: {
name: 'ServeHub.io',
short_name: 'ServeHub',
description: 'Find ur next job in the hospitality industry. Explore roles in hotels, restaurants, bars, and more.',
theme_color: '#099250',
icons: [
{
src: 'android-chrome-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: 'android-chrome-512x512.png',
sizes: '512x512',
type: 'image/png'
}
],
},
workbox: {
navigateFallback: '/'
},
devOptions: {
enabled: true,
type: 'module'
}
},
components: [
{
path: '~/components', // will get any components nested in let's say /components/test too
Expand Down
Loading

0 comments on commit 84e2afb

Please sign in to comment.