Skip to content
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

[RFF] Avoid Code Duplication #676

Open
aress31 opened this issue Mar 2, 2022 · 0 comments
Open

[RFF] Avoid Code Duplication #676

aress31 opened this issue Mar 2, 2022 · 0 comments

Comments

@aress31
Copy link

aress31 commented Mar 2, 2022

The way I configure the SEO of my website using Helmet is as follows:

  '/': {
    meta: [
      {
        content:
          'X',
        name: 'description',
      },
      {
        content:
          'X',
        property: 'og:description',
      },
      {
        content: 'Home',
        property: 'og:title',
      },
      {
        content: 'Y',
        property: 'og:url',
      },
    ],
    title: 'Home',
  },

I tend - and I am sure I am not the only one - to use the same og:description and description. Therefore, this adds a lot of code duplication - and my entries can be quite lengthy.

Could it be possible to specify an array for the property? For example:

'/': {
    meta: [
      {
        content:
          'X',
        name: ['description', 'og:description'],
      },
      {
        content: 'Home',
        property: 'og:title',
      },
      {
        content: 'Y',
        property: 'og:url',
      },
    ],
    title: 'Home',
  },
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

1 participant