Skip to content

Add an option for custom attributes to link and meta tags #11

Description

@sompylasar

For example, I cannot express the following tag

<link rel="icon" type="image/png" sizes="32x32" href="/img/favicons/favicon-32x32.png">

with the structured description:

{ link: { rel: { icon: '/img/favicons/favicon-32x32.png' } } }

as it would only render as:

<link rel="icon" href="/img/favicons/favicon-32x32.png">

The internal API is operating on arrays of tags with arbitrary number of attributes, but this API is not exposed, only the nested object with a limited level of nesting can be specified.

The API i'd prefer would be as follows:

{ link: [
  { rel: 'icon', href: '/img/favicons/favicon-32x32.png', type: 'image/png', sizes: '32x32' },
  { rel: 'icon', href: '/img/favicons/favicon-16x16.png', type: 'image/png', sizes: '16x16' },
] }

What do you think?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions