dedecms【搜索结果出图】的改造方法
已有 227 次阅读 2019-06-01 02:35<script type="application/ld+json">
{
"@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld",
"@id": "{dede:global.cfg_basehost/}{dede:field name='arcurl'/}",
"appid": "你的ID",
"title": "{dede:field.title/}",
"images": [
"{dede:field.litpic /}" //获取文章第一张图片
],
"description": "{dede:field.description function='html2text(@me)'/}",
"pubDate": "{dede:field.pubdate function="MyDate('Y-m-dTH:i:s',@me)"/}"
}
</script>
发表评论 评论 (4 个评论)
http://uqseo.com/dedecms/114.html
http://uqseo.com/dedecms/116.html
{if $matchContent[1][0]}
<script type="application/ld+json">
{
"@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld",
"@id": "{$article.Url}",
"appid": "您的熊掌号AppID",
"title": "{$title}{$f}{$name}{$subname}",
"images": [
"{$matchContent[1][0]}",
"{$matchContent[1][1]}",
"{$matchContent[1][2]}"
],
"pubDate": "{$article.Time('Y-m-d\TH:i:s')}"
}
</script>
{/if}
https://www.w3h5.com/post/179.html