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

fix: meta not respecting social variables, customized title #176

Merged
merged 7 commits into from
Nov 26, 2021
Merged

Conversation

ccorda
Copy link
Contributor

@ccorda ccorda commented Oct 26, 2021

refs #174
refs #172
refs #177

@vercel
Copy link

vercel bot commented Oct 26, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/patronage/bubs-next/DTUHoMzcX9UPDtqXzVHqn5pEzjnC
✅ Preview: https://bubs-next-git-174-seo-patronage.vercel.app

@ccorda ccorda marked this pull request as draft November 19, 2021 16:12
@ccorda ccorda linked an issue Nov 22, 2021 that may be closed by this pull request
@ccorda ccorda changed the title SEO docs, fix bugs fix: meta not respecting social variables, customized title Nov 22, 2021
@ccorda ccorda marked this pull request as ready for review November 22, 2021 03:35
imageUrl.indexOf('http://') === -1 &&
imageUrl.indexOf('https://') === -1
) {
imageUrl = META.url + imageUrl;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible there's a situation where imageUrl is relative and without a leading slash and we need to add a slash between META.url and imageUrl? Also should we expect users/devs to always set the META.url without a trailing slash or do we need to check/sanitize that as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good feedback, ty. agree we should check/document.

Copy link
Collaborator

@chrisherold chrisherold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one note on image url generation, otherwise lgtm

* main:
  fix: Get stylelint working again (#182)
  feat: Next 12 upgrade (#180)
  feat: bumping husky to version 7 (#179)
@ccorda
Copy link
Contributor Author

ccorda commented Nov 26, 2021

Made those change @chrisherold. I realized that the image proxy i implemented was an 80% solution, but missing the actual solve (the issue is that twitter won't index images when you have robots.txt that blocks access, which WP engine does on .wpengine domains). I made a new config variable, and the redirect rule so that next proxies the remote image.

Confirmed this is output:

<meta property="og:image" content="https://bubs.patronage.org/wp-content/uploads/2021/10/spacejoy-EVjqpcn79AM-unsplash.jpg"/>

That path then proxies WP, but does so without robot blocking metas that make twitter mad.

Also setup our test case to have custom Twitter meta fields and confirmed they work:
https://bubs-next-f7yb6eq92-patronage.vercel.app/test-cases/test-custom-social/

* main:
  feat: log wp admin users into front-end preview mode (#173)
Copy link
Collaborator

@chrisherold chrisherold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ccorda ccorda merged commit c041759 into main Nov 26, 2021
@ccorda ccorda deleted the 174-seo branch November 26, 2021 23:06
ccorda added a commit that referenced this pull request Dec 28, 2021
* main:
  simpler eslint config (no custom babel) (#185)
  chore: node minor dep upgrades (#188)
  docs: env variable with graphcdn
  fix bug in postheader loading wrong scss file
  fix env.sample domain for graphcdn
  fix: meta not respecting social variables, customized title (#176)
  feat: log wp admin users into front-end preview mode (#173)
  fix: Get stylelint working again (#182)
  feat: Next 12 upgrade (#180)
  feat: bumping husky to version 7 (#179)
  resolve bug where clicking 'view' in wp-admin leads to a broken redirect (#165)
  feat: new convenience plugins in wordpress admin (#166)
  feat: theme mod instead of acf options for preview mode url (#163)
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

Successfully merging this pull request may close these issues.

Twitter specific metas
3 participants