Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Doc Site SEO + Open Graph #355

Closed
Tracked by #783
endigo9740 opened this issue Oct 12, 2022 · 7 comments · Fixed by #822
Closed
Tracked by #783

Doc Site SEO + Open Graph #355

endigo9740 opened this issue Oct 12, 2022 · 7 comments · Fixed by #822
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request ready to test Ready to be tested for quality assurance.
Milestone

Comments

@endigo9740
Copy link
Contributor

endigo9740 commented Oct 12, 2022

As we prep for the v1 launch we need to revisit the following:

  1. SEO / Metatags - ensure we're well optimized for search
  2. Implement Open Graph data - consider using Vercel's Satori tool
  3. Revisit our blog SEO/Open graph, as Ghost provides some of this turnkey.

@niktek I welcome your support on this one as well!

@endigo9740 endigo9740 added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 12, 2022
@endigo9740 endigo9740 self-assigned this Oct 12, 2022
@endigo9740
Copy link
Contributor Author

@niktek
Copy link
Contributor

niktek commented Oct 27, 2022

Just doing some background research and came across this component for handling metadata in svelte:
https://github.com/oekazuma/svelte-meta-tags

Seems to be recently updated too

@niktek niktek mentioned this issue Oct 27, 2022
@endigo9740 endigo9740 changed the title Open Graph Updates + Review Satori SEO + Open Graph Updates (review Satori) Nov 4, 2022
@ak4zh
Copy link
Contributor

ak4zh commented Nov 10, 2022

Here's svelte equivalent of vercel-og using satori:
https://github.com/etherCorps/sveltekit-og

@endigo9740 endigo9740 added this to the v1.0 milestone Nov 16, 2022
@endigo9740 endigo9740 changed the title SEO + Open Graph Updates (review Satori) SEO + Open Graph Jan 7, 2023
@endigo9740 endigo9740 mentioned this issue Jan 7, 2023
10 tasks
@endigo9740 endigo9740 added the help wanted Extra attention is needed label Jan 7, 2023
@endigo9740
Copy link
Contributor Author

FYI I've tagged myself and Nik since we will need to be involved with this, but I do welcome help from anyone wiling and able to implement the changes in the codebase. Thanks!

@endigo9740 endigo9740 pinned this issue Jan 9, 2023
@endigo9740 endigo9740 changed the title SEO + Open Graph Doc Site SEO + Open Graph Jan 9, 2023
@endigo9740
Copy link
Contributor Author

@endigo9740 endigo9740 unpinned this issue Jan 12, 2023
@endigo9740 endigo9740 pinned this issue Jan 13, 2023
@endigo9740
Copy link
Contributor Author

endigo9740 commented Jan 13, 2023

@endigo9740 endigo9740 linked a pull request Jan 13, 2023 that will close this issue
@endigo9740 endigo9740 added ready to test Ready to be tested for quality assurance. and removed help wanted Extra attention is needed labels Jan 13, 2023
@endigo9740
Copy link
Contributor Author

endigo9740 commented Jan 13, 2023

A PR is now available and ready to test here:

Preview:

Unfortunately it wasn't as trivial as I'd hoped. But here's what the "before" looked like with meta tag tools like:
https://metatags.io/

image

Then after:

image

image

However I am getting one odd issue - when testing directly on Twitter, I get inconsistent results.

  • For the homepage, the open graph data never appears. Though it's very clearly set.
  • For article pages, it never works the first time, but when deleting and paste the URL again it appears

I'm going to chalk up that latter issue to Twitter bugs, but I'm not quite certain why the homepage isn't working

image

image

I suppose an important detail here is I've had to dramatically change where and how meta tags are rendered. Originally they were set in app.html which of course carries through the entire site. Then on a blog article page I'd use <svelte:head> to "overwrite" these. Turns out that does work - we end up with duplicate tags. So instead I've followed SvelteKit's advice here regarding $page.data:
https://kit.svelte.dev/docs/seo#manual-setup

image

Now all meta data is set in a <svelte:head> element in the root layout. This appears to work in most regards - but I worry this may be the cause of our Twitter issue. If anyone has any ideas I'm all ears. Thanks!

@endigo9740 endigo9740 unpinned this issue Jan 15, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request ready to test Ready to be tested for quality assurance.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants