Skip to content

[Feature]: Support more manifest fields #4933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kpiotr opened this issue Mar 31, 2025 · 1 comment
Open

[Feature]: Support more manifest fields #4933

kpiotr opened this issue Mar 31, 2025 · 1 comment

Comments

@kpiotr
Copy link

kpiotr commented Mar 31, 2025

What problem does this feature solve?

It would be great if more manifest members were supported, to allow more customization.

It's currently possible to specify the "name" and "icons" through the html.appIcon api

What does the proposed API look like?

One way it could be done: add more fields to the html.appIcon

type AppIconItem = {
  src: string;
  size: number;
  target?: 'apple-touch-icon' | 'web-app-manifest';
};

type AppIcon = {
// existing fields
  name?: string;
  icons: AppIconItem[];
  filename?: string;
// new fields
  short_name: string;
  orientation: string;
  display: string;
  start_url: string;
  background_color: string;
  theme_color: string;
// ... etc


};

Another way would be, instead of calling the configuration option html.appIcon, add a configuration option called html.manifest, with a similar API

type IconItem = {
  src: string;
  size: number;
  target?: 'apple-touch-icon' | 'web-app-manifest';
};

type Manifest = {
// existing fields
  name?: string;
  icons: IconItem[];
  filename?: string;
// new fields
  short_name: string;
  orientation: string;
  display: string;
  start_url: string;
  background_color: string;
  theme_color: string;
// ... etc
@chenjiahan
Copy link
Member

This is beyond the scope of html.appIcon itself.

The easiest way to do this is to create a manifest.webmanifest file in the public folder and reference it in the HTML template.

One idea I had is to allow html.appIcon to write properties to the public/manifest.webmanifest file, which would allow using both approaches at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants