ai_automator support for metatag (metatag module_

Created on 26 July 2024, 6 months ago

Problem/Motivation

there's the metatag module which is often used.
There's two (main) metatag AI modules

and there's https://www.drupal.org/project/seostudio β†’

I was considering making a port of one of these into the ai module, but I would think with automator we could also fill in metatag fields dynamically?
Or would that not be the right approach?

I don't know if it's possible or what the ambitions are here?

πŸ’¬ Support request
Status

Active

Version

1.0

Component

AI Automators

Created by

πŸ‡§πŸ‡ͺBelgium wouters_f Leuven

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @wouters_f
  • πŸ‡©πŸ‡ͺGermany marcus_johansson

    Changing to feature request - this has been thought of many times, but should be done.

  • πŸ‡©πŸ‡ͺGermany marcus_johansson

    We have a first version. How to use.

    In the normal prompt field, you just have to list the context.

    Under advanced settings, you have to create a prompt the describes what to do and an example.

    So if you want to change the meta description for instance:
    "Write a metatag description, under 160 characters in length, based on the body, that is written like an adult trying to pretend to be a cringe teenager."

    And in the example for it:
    "This is rad teens, the man himself said it!"

    Notes for AC:
    * It should handle that one of the fields you have prompts for is empty and it will run.
    * It will not run, if there is a placeholder for a field, you have to manually remove the placeholder.
    * This does everything in one prompt - if you need to fill out 100 meta tags, even gpt-4o might have issues with this, we have to look into if we need another automator for such cases.
    * For translations, you currently have to empty the fields before running it in the translation, but that is just how automators works.

  • πŸ‡¬πŸ‡§United Kingdom MrDaleSmith

    No problems with the code and works as designed. Might want some work to tidy up the form in future, as AI generated content wouldn't be sensible for a lot of the tags (I can only really see it being useful for summarises articles into a meta description?) but appreciate that will be a lot of work.

  • πŸ‡©πŸ‡ͺGermany marcus_johansson

    Thanks Paul & agreed - the problem is that there is a lot of plugins that can extend it, and its hard to know beforehand which ones can and can't be used.

    There are some more in theory - like if you have and old website with just a ckeditor field, you could use it as context and extract an image url. That is not necessarily a AI issue, and code would make a better job, but you could use it for it, if you are out of options/developers. I guess title for certain platforms can be rewritten for audience as well.

    wouters_f promised to have a feature look at it as well before I merge. Since he raise the issue - just to make sure it is what he wanted.

  • πŸ‡§πŸ‡ͺBelgium wouters_f Leuven

    Ok so yes ok I tried it out.
    Once I got the hang of it !
    Really cool. working perfect (as usual).

    I also agree with the form complexity, it's a bit overwhelming indeed. On the other hand we give editors maximal power and I got it once I started reading the description texts.

    I was searching for 10 minutes first because I was used to (i've always done it like that, not saying its everybody) configuring metatags at admin/config/search/metatag and there's no mention of ai_automators there whatsoever. So i was confused.
    It's also there you have the inheritance system for metatags, so I guess maybe that's why i was expecting it there?

    Apart from that: Very nice, thanks!

  • πŸ‡©πŸ‡ͺGermany marcus_johansson

    Getting merged and we have the follow up ticket to make a lot better documentation for the Automators.

  • πŸ‡ΊπŸ‡ΈUnited States rtdean93

    Just implemented this and very impressed. If you need help with documentation, I'd be happy to help. I'd like to see this replace (or as an alternative) to the AI Content suggestion widgets in the sidebar.

Production build 0.71.5 2024