Skip to content

Commit e1a9e9a

Browse files
Lucas S. B. Mastellaaddyosmani
authored andcommitted
Lighthouse best practices audit: short_name (#63)
Should inform the user about the Lighthouse recommendation of Best Practices, rather than implicitly applying the "name" as "short_name". > Manifest's short_name Won't Be Truncated When Displayed on Homescreen ([Lighthouse](https://developers.google.com/web/tools/lighthouse/audits/manifest-short_name-is-not-truncated))
1 parent 63e795d commit e1a9e9a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

meta.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ module.exports = {
1414
"required": true,
1515
"message": "Project name"
1616
},
17+
"short_name": {
18+
"type": "string",
19+
"required": false,
20+
"message": "Project short name: fewer than 12 characters to not be truncated on homescreens (default: same as name)",
21+
},
1722
"description": {
1823
"type": "string",
1924
"required": false,

template/static/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "{{ name }}",
3-
"short_name": "{{ name }}",
3+
"short_name": "{{#if short_name }}{{ short_name }}{{else}}{{ name }}{{/if}}",
44
"icons": [
55
{
66
"src": "/static/img/icons/android-chrome-192x192.png",

0 commit comments

Comments
 (0)