我最近在linkedin上发布了我的个人博客。但是,该链接仅显示我的姓名,并且没有任何图像或详细信息。以下是它的外观:
违规链接显示在图片底部,仅显示我的姓名和网址我会添加或编辑哪些字段,以使链接显示图片和一些描述性文字?
我网站的<head>
看起来像这样:
<head>
<meta name="author" content="Connor Leech">
<title>Connor Leech</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="cleartype" content="on">
<meta name="MobileOptimized" content="320">
<meta name="HandheldFriendly" content="True">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="description" content="Connor is a Web Developer based near San Francisco specializing in PHP, Javascript, Serverless and Node.js">
<meta name="keywords" content="laravel, aws, javascript, php, developer, software engineer, web development, software, node.js, serverless, lambda, san francisco, bay area, east bay, vue, vuejs, vue.js, vue 2, laravel 5, amazon web services">
<meta name="zipcode" content="94501">
<meta name="city" content="Alameda">
<meta name="state" content="California">
<meta name="country" content="United States">
<meta name="language" content="EN">
<meta property="og:site_name" content="Connor Leech">
<!-- Vendor Fonts-->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="/bower_components/animate.css/animate.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Yantramanav" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries--><!-- WARNING: Respond.js doesn't work if you view the page via file://--><!--if lt IE 9script(src='https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js')
script(src='https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js')
-->
<link rel="alternate" href="/atom.xml" title="config.title" type="application/rss2.xml">
<link rel="stylesheet" href="/css/main.css">
<script type="text/javascript" async="" src="//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="app/main" src="/js/app/main.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="app/animations" src="/js/app/animations.js"></script><script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="app/nav" src="/js/app/nav.js"></script>
</head>
答案 0 :(得分:1)
您要找的是在og:
中设置 OpenGraph protocol (<meta>
)<head>
个属性。
所需的四个属性是:
你实际上已经为你的名字设置了一套(<meta property="og:site_name" content="Connor Leech">
),这就是它的原因。但是,您实际上并未使用任何其他OG信息。
这是一个利用所有四个的样本:
<html prefix="og: http://ogp.me/ns#">
<head>
<meta property="og:title" content="My Shared Article Title" />
<meta property="og:description" content="Description of shared article" />
<meta property="og:url" content="http://example.com/my_article.html" />
<meta property="og:image" content="http://example.com/foo.jpg" />
</head>
不要忘记在"og: http://ogp.me/ns#"
上设置<html>
前缀。
有关LinkedIn如何使用OpenGraph的更多信息,请访问 here 。
希望这有帮助! :)