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

Adding tags for SEO #108

Closed
3 tasks
Tracked by #168
dennyabrain opened this issue Jun 27, 2023 · 5 comments
Closed
3 tasks
Tracked by #168

Adding tags for SEO #108

dennyabrain opened this issue Jun 27, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@dennyabrain
Copy link
Contributor

dennyabrain commented Jun 27, 2023

For every page or post that is published on our site, we must add relevant tags in the metadata for that post. We'll need to write some code so that gatsby puts those tags into the html head element so that search engine crawlers can index it.

The scope of this issue includes :

  • Build the feature for taking tags from the markdown frontmatter and putting it in the html head element
  • Add tags to all the existing content and verify if they are appearing in the published pages
  • Documenting the process in the README for future contributors
@dennyabrain dennyabrain changed the title SEO improvements Adding tags for SEO Jun 27, 2023
@dennyabrain dennyabrain self-assigned this Jun 27, 2023
@dennyabrain dennyabrain added enhancement New feature or request good first issue Good for newcomers labels Jun 27, 2023
@aatmanvaidya
Copy link
Contributor

@maanasb01
Copy link
Collaborator

Hello, are the tags to be included in the <meta name="keywords"> tag? I tried this issue and was able to include the tags for each blog post page in the <meta name="keywords"> tag. I created a Map for each slug and its tags and then added the keywords in the <meta name="keywords"> tag based on the page's slug. For the current page's slug, I am extracting it from the path coming from the useLocation hook (which was already being used in Seo.js ). I have done this for blog post pages only (as the path check was already being done for "/blog/", so I just extracted the slug from there for all blog posts). What other pages would require tags?

@dennyabrain
Copy link
Contributor Author

@maanasb01 its ok to do it just for the blogs for now. Feel free to make a PR with your code.

@maanasb01
Copy link
Collaborator

@dennyabrain Upon further review of the code, I have determined that I wouldn't need to use the Map or the path name, as the SEO component already accepts meta props from the blog_layout component. Therefore, we only need to pass meta.tags. A similar approach can be applied to resolve the issue #26, where dynamic social cards are required. I am creating a PR for the issue. Should I include the changes for issue #26 in the same PR? Or create a separate one for that?

@dennyabrain
Copy link
Contributor Author

One PR is good..just mention both in the PR to link them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants