dachcom-digital / pimcore-seo

The last SEO Bundle for Pimcore you'll ever need!
Other
38 stars 14 forks source link

[Title & Description Integrator]: Add noindex option and rename to "General Integrator" #37

Closed aarongerig closed 1 year ago

aarongerig commented 1 year ago
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes

I would like to introduce a new checkbox field for the "Title & Description Integrator". This checkbox field would allow the user to individually exclude documents/objects from being indexed by Google & Co. By activating it, the SeoBundle would render a <meta name="robots" content="noindex, nofollow"> meta tag.

Additionally I think it would make sense to rename the Integrator to something like "General Integrator" since it now doesn't only manipulate title and description tags, but more so is there to configure "general" settings relevant to SEO.

So here are my two questions:

  1. Would you accept such a pull request with the above mentioned changes?
  2. Would you also accept the pull request to be merged into V1 in order to release a new version for Pimcore 6?

Looking forward to hear what you think! 🙂

aarongerig commented 1 year ago

Any input on this, so I can start with the implementation? Would be very much appreciated – thanks! 🙂

solverat commented 1 year ago

@aarongerig That's a good one, thanks! It's already on my to-do list. We're only going to release that for v2, but we would accept a PR for v1 then!

solverat commented 1 year ago

@aarongerig I was thinking about how to implement this and I'm wondering if there is an easier way to this.

I came up with this: We're going to extend the "HTML-Tags" tab with an additional dropdown "presets":

image


Those presets can be configured like this, so it's easy to extend them:


  -   integrator_name: html_tag
      integrator_config:
          presets:
              -
                  label: 'Robots No-Index'
                  value: '<meta name="robots" content="noindex, nofollow">'
                  icon_class: 'pimcore_icon_stop'
              -   label: 'Secret Meta-Link'
                  value: '<meta name="secret" content="secret-thing">'

Furthermore, those preset values cannot be edited: image


Also, to assert safety here, it's possible to disable the "Add HTML Tag-Field" (and also the warning) by adding the presets_only_mode flag:


-   integrator_name: html_tag
    integrator_config:
        presets_only_mode: true
        presets:
            -
                label: 'Robots No-Index'
                value: '<meta name="robots" content="noindex, nofollow">'
                icon_class: 'pimcore_icon_stop'

Which then looks like this: image

image


What do you think?

solverat commented 1 year ago

Maybe we should replace the Title "Tag:" with the Preset name.

aarongerig commented 1 year ago

@solverat Love it! Really like the approach to make it flexible with those presets, so we're not limited with adding other meta tags in the future. The presets_only_mode flag definitely makes sense IMO too!

Regarding the title "Tag:": Either "HTML Output" or the name of the preset, I'm good with both. 😊

solverat commented 1 year ago

@aarongerig: That's the current state:

image

If you're allowing custom tags too, it looks like this:

image

I think that's it, right?

aarongerig commented 1 year ago

@solverat Yup, that should be pretty much it! 👍

solverat commented 1 year ago

Done with #42! Thanks @aarongerig for the inputs!