Tumblr theming - show preview image for “link” post type?

做~自己de王妃 提交于 2020-01-01 03:50:27

问题


When you add a "link" type post to Tumblr:

...your admin shows a small thumbnail of any image associated with that link:

However, this doesn't show on the frontend of the site:

Is there any way to pull this image through?


回答1:


Tumblr Link Theme Operator and Thumbnail

Tumblr recently added some new theme operators to allow for link thumbnails.

I presume this works the same as video thumbnails work and may only be available if the linked site creates the thumbnail.

{block:Link}
{block:Thumbnail}
<img src="{Thumbnail}" alt="{Name}">
{/block:Thumbnail}
{/block:Link}

Reference: http://www.tumblr.com/docs/en/custom_themes#link-posts




回答2:


This is how it's done:

Click on your blogs name on the dashboard above or in the bloglist on the right hand side.

Click on Customize on the right hand side (or just go to the template you chose)

Once you're in there you can change the HTML on top on the left hand side, right under the templates name and icon

There you look for the {block:Link} and before the description you add: {block:Thumbnail} <img src="{Thumbnail}" alt="{Name}"> {/block:Thumbnail}`



来源:https://stackoverflow.com/questions/22530756/tumblr-theming-show-preview-image-for-link-post-type

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!