Skip to content

Commit 181a05b

Browse files
authored
Merge pull request #6 from kabaluyot/feature/add-pwa-options
feat: add pwa options
2 parents 18875df + 3d33807 commit 181a05b

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ APP_NAME='Daks.ts'
22
APP_DESCRIPTION='By kabaluyot'
33
APP_HOST=localhost
44
APP_PORT=3000
5+
APP_URL=http://localhost:3000
56

67
API_URL=https://jsonplaceholder.typicode.com

nuxt.config.js

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,38 @@ export default {
1919
hid: 'description',
2020
name: 'description',
2121
content: process.env.APP_DESCRIPTION || ''
22+
},
23+
// OG Tag setup
24+
// https://vue-meta.nuxtjs.org/api/#meta
25+
{
26+
property: 'og:type',
27+
content: 'website',
28+
vmid: 'og:type'
29+
},
30+
{
31+
property: 'og:title',
32+
content: process.env.APP_NAME,
33+
vmid: 'og:title'
34+
},
35+
{
36+
property: 'og:description',
37+
content: process.env.APP_DESCRIPTION,
38+
vmid: 'og:description'
39+
},
40+
{
41+
property: 'og:site_name',
42+
content: process.env.APP_URL,
43+
vmid: 'og:site_name'
44+
},
45+
{
46+
property: 'og:url',
47+
content: process.env.APP_URL,
48+
vmid: 'og:url'
49+
},
50+
{
51+
property: 'og:image',
52+
content: process.env.APP_URL + '/icon.png',
53+
vmid: 'og:image'
2254
}
2355
],
2456
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
@@ -58,7 +90,30 @@ export default {
5890
** Axios module configuration
5991
** See https://axios.nuxtjs.org/options
6092
*/
61-
axios: {},
93+
axios: {
94+
debug: process.env.NODE_ENV !== 'production',
95+
headers: {
96+
common: {
97+
Accept: 'application/json, text/plain, */*'
98+
}
99+
}
100+
},
101+
/**
102+
* PWA module configuration
103+
* https://pwa.nuxtjs.org/setup.html
104+
*/
105+
pwa: {
106+
meta: {
107+
title: process.env.APP_NAME
108+
},
109+
manifest: {
110+
name: process.env.APP_NAME,
111+
short_name: process.env.APP_NAME,
112+
description: process.env.APP_DESCRIPTION,
113+
start_url: process.env.APP_URL,
114+
lang: 'en'
115+
}
116+
},
62117
/*
63118
** vuetify module configuration
64119
** https://github.com/nuxt-community/vuetify-module

0 commit comments

Comments
 (0)