ONEARMY / community-platform

A platform to build useful communities that aim to tackle global problems
https://platform.onearmy.earth
MIT License
1.1k stars 370 forks source link

[bug] Some meta tags on ProjectKamp (and maybe FixingFashion) are wrong #3633

Open pizzaisdavid opened 2 months ago

pizzaisdavid commented 2 months ago

Describe the bug Some meta tags seem to be wrong.

To Reproduce Steps to reproduce the behaviour:

  1. Go to https://community.projectkamp.com/research?sort=Newest
  2. Inspect.
  3. Open the head tag.
  4. Find the meta tag with the name description.

Screenshot from 2024-06-08 17-07-50

Some reference Precious Plastic instead of Project Kamp. The wrong ones seem to be:

There could be more. I'm not sure.

<meta property="og:description" content="A series of tools for the Precious Plastic community to collaborate around the world. Connect, share and meet each other to tackle plastic waste.">
<meta property="og:url" content="https://community.preciousplastic.com">
<meta name="twitter:description" content="A series of tools for the Precious Plastic community to collaborate around the world. Connect, share and meet each other to tackle plastic waste.">
<meta name="description" content="A series of tools for the Precious Plastic community to collaborate around the world. Connect, share and meet each other to tackle plastic waste.">
pizzaisdavid commented 2 months ago

There is some code for this kind of thing, but it seems to not work: https://github.com/ONEARMY/community-platform/blob/master/scripts/postCraBuild.ts#L77

pizzaisdavid commented 2 months ago

That script I linked above is triggered via a package.json script build:inject-config

Which is ran on the individual deployments: https://app.circleci.com/pipelines/github/ONEARMY/community-platform/9047/workflows/b5c08849-70ff-42fb-adc4-469b17459aba/jobs/78982/parallel-runs/0/steps/0-106

pizzaisdavid commented 2 months ago

On my machine, doing:


yarn run build
export REACT_APP_PLATFORM_THEME=project-kamp
yarn run build:post

Does result in some project specific stuff on some of the properties in the build/index.html file (some probably don't change because the script needs to be updated generally.)

pizzaisdavid commented 2 months ago

This probably wont fix it, but I adding some logs to the script so we get some better idea if something weird is going on.

https://github.com/ONEARMY/community-platform/pull/3634

Would check this ticket again after this is merged and then another deployment happens after that.

pizzaisdavid commented 2 months ago

Question: is there an already existing SEO description for Fixing Fashion? I checked the codebase and didn't see one, currently the precious plastic one is applied for Fixing Fashion.

@davehakkens (or if anyone else wants to chime in..)