<meta content="object" property="og:type"> <meta content="GitLab" property="og:site_name"> <meta content="Sign in" property="og:title"> <meta content="USTC Linux User Group - GitLab" property="og:description"> <meta content="https://imgs.developpaper.com/imgs/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" property="og:image"> <meta content="64" property="og:image:width"> <meta content="64" property="og:image:height"> <meta content="https://git.lug.ustc.edu.cn/users/sign_in" property="og:url">
Transferred from: https://www.jianshu.com/p/ded…
1、 What is open graph protocol
Open graph protocol itself is a set of metatags specification, which is used to label the type of page and describe the content of page. Announced by Facebook at the 2010 F8 conference.
2、 How to participate in open graph protocol
Og tag is a new HTTP header tag, namely open graph protocol. Adding this protocol to the page can make the page become a “rich media object” and agree that the content of the page can be referenced by other social websites.
At present, SNS websites such as Facebook and Renren support the agreement. As long as any web page complies with the agreement, SNS website can extract the most effective information from the page and present it to users; SNS website can also present it to users according to the content specified by og tag on the page.
3、 Benefits of participating in open graph protocol
Can share your content to SNS website correctly
Help your content spread more effectively in SNS website
4、 Will it affect Baidu
The added og tags can be found and evaluated by search engines. That is to say, you can use the original meta information optimization methods to og tags at the same time to strengthen the content of meta information optimization. It is very beneficial for weight promotion and ranking.
At present, baidu supports og protocol. According to Baidu’s standard, adding og tag is one of the preconditions to participate in Baidu Spark Program.
Benefits of participating in og agreement for Baidu collection:
Can be correctly captured by spiders your web page to Baidu web page search
Help your content more effectively in Baidu structured display
Examples are as follows:
– this field is fixed and required, indicating that the current page type conforms to the article work type in og protocol
– earliest publishing time, this field is required and can not be displayed in the page. The content format should conform to UTC format of iso8601 standard, and the standard format should be “yyyy-mm”- DDTHH:MM : SS + time zone
– the author signature field is required and needs to be displayed on the page
*If the article is completed by more than one author, you can add another line of author signature code:
– original media name and link, used to distinguish original and reprint, this field is optional. When original, the link is the same as itself; when reprinted, the link is another different address.
5、 How to add og tag?
Add og tag in the page, that is, add meta property = og tag.
Main og tag attributes:
Og: type indicates the type of the page. The common values are article, news, book, movie, product
Og: title of the page
Og: a brief description of the description page
Og: URL page address
Og: image thumbnail address
og:site_ Name the name of the website where the page is located
Og: videosrc video or Flash address
Og: audiosrc audio address