# Manifest.json
All Marfeel sites have a default manifest.json
configured with their own logo and site name. This file, along with Marfeel service workers, enables the "Add to Homescreen" functionality for readers.
This file is generated at build-time and is not visible in a tenant's code repository. Only customizations are versioned.
# See the default manifest.json
From within a tenant's folder repository, run jinks --manifest
to generate the manifest.json
.
A new file is generated in the index folder of the tenant, next to the logo.
Example:
{
"name": "example.com",
"short_name": "example",
"start_url": "https://example.com",
"theme_color": "null",
"display": "standalone",
"background_color": "#FAFAFA",
"gcm_sender_id": "123456789",
"icons": [{
"src": "https://live.mrf.io//statics/example.com/index/icon.png?width=144&enable=upscale",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "https://live.mrf.io//statics/example.com/index/icon.png?width=192&enable=upscale",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "https://live.mrf.io//statics/example.com/index/icon.png?width=512&enable=upscale",
"sizes": "512x512",
"type": "image/png"
}
]
}
WARNING
Do not commit this file.
# Customize the manifest.json
- Create a new
manifest.json
file in a newmanifest
folder:
example.com
└─ index
├─ manifest
│ └─ manifest.json
├─ src
└─ themes
- In this file, start by extending the default manifest:
{
"extends": "example.com/index/manifest.json",
"short_name": "Super"
}
And override any property necessary, such as
short_name
.Generate the new manifest with
jinks --manifest
to check the result!
TIP
Remember to only commit the manifest/manifest.json
with the extends
property, and never the compilation result.