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

Implement Open Graph protocol to increase social media presence #25

Open
3 tasks
majordwarf opened this issue Oct 7, 2019 · 18 comments
Open
3 tasks

Implement Open Graph protocol to increase social media presence #25

majordwarf opened this issue Oct 7, 2019 · 18 comments
Labels
Good First Issue Good for newcomers

Comments

@majordwarf
Copy link
Member

Open Graph protocol (OGP) gives you control of how website/page specifc data travels to third-party sites. Providing much better social media presence along with optimized SEO. Right now we are using Helmet to do manage the head and meta tags for the pages. The main layout component would require some restructuring along with additional changes to other pages to implement OGP as currently the head is being rendered inside body, which works but is a bad practice.

You can learn more about OGP here.


Things to be done:

  • Restructure layout component and other pages to place head section appropriately.
  • Implement OGP on the existing pages.
  • Extend OGP to blog posts and modules.
@majordwarf majordwarf added the Good First Issue Good for newcomers label Oct 7, 2019
@ANURADHAJHA99
Copy link

I would like to work on the following issue. Thank you very much.

@GraceChiamaka
Copy link
Contributor

@ANURADHAJHA99 are you working on this?

@ANURADHAJHA99
Copy link

@GraceChiamaka Yes, I am working on it.

@ANURADHAJHA99
Copy link

@majordwarf I was going through the layout component and started working on introducing OGP, but I am having certain issues understanding how should I introduce the basic metadata? Can you please provide me a small example, or help me understand it?

@majordwarf
Copy link
Member Author

You can look at how meta-data for blog and modules are stored in their respective markdown files as frontmatter. We need to implement OGP to take that data dynamically to make the shared post on social media with appropriate metadata being shown.

@ANURADHAJHA99
Copy link

can we use OGP in markdown modules?

@majordwarf
Copy link
Member Author

Nope, we currently have 200+ modules. Updating each README.md with their respective meta-data manually is a tedious task. The main purpose of this project was to automate as many as tasks possible and to reduce manual effort. Also, the OpenGraph tags won't be generated inside the markdown file. it's just the wrong heirarchy of tags even if they are generated. We want the tags to be generated inside the head of every page. The content of the markdown is used to go inside the body not inside the head.

@ANURADHAJHA99
Copy link

Screenshot from 2019-10-14 15-51-50

I updated the about component, with basic metadata, am I doing it correctly?

@majordwarf
Copy link
Member Author

No, the only thing that needs to change is the layout component and all the other pages, posts pages passing props back to parent to avoid writing the same boilerplate code again and again.

So the layout will contain variables that will replace the OpenGraph meta-tags' content. During the build, the child component will pass some variables back to the parent to replace the variables.

@ANURADHAJHA99
Copy link

Ok, got it now! Thank you very much for your help.

@ANURADHAJHA99
Copy link

Sorry, I have a doubt, we are suppose to pass the child header component with the variables in the layout component such that it replaces the variable in the header parent component?

@ANURADHAJHA99
Copy link

Screenshot from 2019-10-14 19-14-39

we have to add states within the highlighted component? I am sorry to continuously disturb, I am learning and working on it.

@majordwarf
Copy link
Member Author

This layout contains Helmet as stated in the first message of the issue itself. It handles how meta-data tags are handled on the website. Currently all I had in mind was to pass props from child like the blog template, post template to the current layout component and that will fill out the variables in Helment component. But not having actually work on it, it might still needs some research. If passing props won't work we might have to rewrite the templates written already.

@ANURADHAJHA99
Copy link

so we are suppose to change the props in the blog.jsx and post.jsx?

@ANURADHAJHA99
Copy link

Essentially I meant, we are supposed to introduce OGP metadata in the blog template and post template?

@majordwarf
Copy link
Member Author

Yes but if you want to directly implement OGP in their respective template, they will need restructuring. Eliminating the need for layout component in them. Or else pass some props to layout if you're using the layout component.

@ANURADHAJHA99
Copy link

There are many other components within the layout components, what should I do to them?

@majordwarf
Copy link
Member Author

Every child component needs to have the tags as said earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants