Skip to content

yardinternet/wp-webmanifest

Repository files navigation

wp-webmanifest

Code Style PHPStan Tests Code Coverage Badge Lines of Code Badge

This package for WordPress (Sage & Acorn) automatically generates a manifest.webmanifest JSON file. It also creates maskable versions of the favicon that will be used as the icons.

Requirements

Installation

To install this package using Composer, follow these steps:

  1. Install this package with Composer:

    composer require yard/webmanifest
  2. Run the Acorn WP-CLI command to discover this package:

    wp acorn package:discover

You can publish the config file with:

wp acorn vendor:publish --provider="Yard\Webmanifest\WebmanifestServiceProvider"

Usage

In theory you don't have to do anything, the Webmanifest works out of the box. This packages uses the favicon set in the theme to generate icons.

But you can alter behavior via the configuration.

Manually configuring icons

You can do this by adding them to the icons array in the config

'icons' => [
  [
    'src' => 'path/to/icon.png',
    'sizes' => '192x192',
    'type' => 'image/png',
  ],
],

Theme settings

You can set the background and theme color by changing the config values below.

'background_color' => '#add8eb',
'theme_color' => '#ffffff',

Icon sizes

'iconSizes' => [192, 384, 512, 1024],

Webmanifest URL path

'url' => '/manifest.webmanifest',

Webmanifest icons url

'iconUrl' => '/webmanifest/icon',

About us

banner

About

Creates web app manifests

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages