yard/webmanifest

Creates web app manifests

Installs: 11

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:package

pkg:composer/yard/webmanifest

v1.2.0 2025-01-07 14:24 UTC

This package is auto-updated.

Last update: 2025-12-05 10:11:00 UTC


README

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