@@ -9,13 +9,75 @@ sidebar: auto
99
1010Manifest adds [ Web App Manifest] ( https://developer.mozilla.org/en-US/docs/Web/Manifest ) with no pain.
1111
12- You can pass options to ` pwa.manifest ` in ` nuxt.config.js ` to override defaults.
12+ You can pass options to ` pwa.manifest ` in ` nuxt.config.js ` to override defaults. Check the
13+ [ valid options] ( https://developer.mozilla.org/en-US/docs/Web/Manifest#Members ) available and and it's
14+ [ default options] ( #default-options ) for deeper insights.
1315
1416``` js
1517pwa: {
1618 manifest: {
1719 name: ' My Awesome App' ,
18- lang: ' fa'
20+ lang: ' fa' ,
21+ useWebmanifestExtension: false
1922 }
2023}
2124```
25+
26+ # Default options
27+
28+ | Property | Type | Default | Description |
29+ | --------------------------------- | --------------- | ------------------------------------------------------------ | --------------------------------------------------------------- |
30+ | ` name ` <sup >\* 1</sup > | ` String ` | ` package.json ` 's name property | [ maximum of 45 characters] |
31+ | ` short_name ` <sup >\* 1</sup > | ` String ` | ` package.json ` 's name property | [ maximum of 12 characters] |
32+ | ` description ` <sup >\* 2</sup > | ` String ` | ` package.json ` 's description property | |
33+ | ` icons ` <sup >\* 1</sup > | ` Array<Object> ` | ` [] ` | (See the [ icon module] ) |
34+ | ` start_url ` <sup >\* 1</sup > | ` String ` | ` routerBase + '?standalone=true' ` | It has to be relative to where the manifest is placed |
35+ | ` display ` <sup >\* 1</sup > | ` String ` | ` 'standalone' ` | |
36+ | ` background_color ` <sup >\* 2</sup > | ` String ` | ` '#ffffff' ` | |
37+ | ` theme_color ` <sup >\* 2</sup > | ` String ` | ` this.options.loading.color ` | Nuxt [ loading color] option |
38+ | ` dir ` | ` String ` | ` 'ltr' ` | ` ltr ` or ` rtl ` . Used with ` lang ` |
39+ | ` lang ` | ` String ` | ` 'en' ` | Recommended if used ` dir ` |
40+ | ` useWebmanifestExtension ` <sup >\* 3</sup > | ` Boolean ` | ` false ` | Whether to use ` webmanifest ` file extension (or default ` json ` ) |
41+ | ` publicPath ` | ` String ` | A combination of ` routerBase ` and ` options.build.publicPath ` | |
42+
43+ - <sup >\* 1</sup > Mandatory (according [ to Google] ( https://web.dev/add-manifest ) ).
44+ Although [ official documentation] ( https://w3c.github.io/manifest/#json-schema ) only mentions ` name ` and ` icons `
45+ - <sup >\* 2</sup > Recommended (according [ to Google] ( https://web.dev/add-manifest ) )
46+ - <sup >\* 3</sup > Please see [ wiki] ( https://github.com/nuxt-community/pwa-module/wiki/.webmanifest )
47+
48+ [ icon module ] : https://pwa.nuxtjs.org/modules/icon.html
49+ [ maximum of 45 characters ] : https://developer.chrome.com/apps/manifest/name
50+ [ maximum of 12 characters ] : https://developer.chrome.com/apps/manifest/name
51+ [ loading color ] : https://nuxtjs.org/api/configuration-loading/#customizing-the-progress-bar
52+
53+ For more information, check out:
54+
55+ - the spec: https://w3c.github.io/manifest/
56+ - Pete LePage's article: https://web.dev/add-manifest/
57+ - MDN Docs: https://developer.mozilla.org/en-US/docs/Web/Manifest
58+
59+ ## Difference between ` name ` and ` short_name ` :
60+
61+ ### ` name `
62+
63+ > The name (maximum of 45 characters) is the primary identifier of the app and is a required field. It is displayed in the following locations:
64+ >
65+ > - Install dialog
66+ > - Extension management UI
67+ > - Chrome Web Store
68+
69+ Source: https://developer.chrome.com/apps/manifest/name
70+
71+ ### ` short_name `
72+
73+ > The short_name (maximum of 12 characters recommended) is a short version of the app's name. It is an optional field and if not specified, the name will be used, > though it will likely be truncated. The short name is typically used where there is insufficient space to display the full name, such as:
74+ >
75+ > - Device home screens
76+ > - New Tab page
77+
78+ Source: https://developer.chrome.com/apps/manifest/name
79+
80+ ## ` useWebmanifestExtension ` :
81+
82+ This options sets the manifest file extension to ` .json ` or ` .webmanifest ` . For more information, check
83+ [ this wiki page] ( https://github.com/nuxt-community/pwa-module/wiki/.webmanifest ) .
0 commit comments