Merge remote-tracking branch 'weaxs/translations-v1' into translations-v1

This commit is contained in:
Aphcity
2024-03-20 18:44:18 +08:00
parent 4a95a42286
commit 4ef29d4697
16 changed files with 670 additions and 629 deletions

View File

@@ -1,24 +1,25 @@
---
title: "Thumbnails"
title: "缩略图"
date: 2022-09-26
draft: false
description: "Turn on thumbnails for your articles."
description: "在你的文章中开启缩略图。"
slug: "thumbnail_sample"
tags: ["thumbnail", "sample"]
summary: "A quick example of how to start using Thumbnails in your artciles."
tags: ["缩略图", "示例"]
summary: "一个展示如何在你的文章中开始使用缩略图的快速示例。"
type: 'sample'
---
A quick example of how to start using Thumbnails in your articles.
这是一个在你的文章使用缩略图的快速示例。
If your average directory for an article looks like this:
如果你的文章目录看起来像这样:
If your average directory for an article looks like this:
```shell
content
└── awesome_article.md
```
You need to change it from a single markdown file into a folder. Create a directory with the same name of the article, inside create a `index.md` file. You'll get a structure similar to what's below.
你需要将他从单个 markdown 文件更改为一个同名文件夹。创建一个与文章同名的目录,并在此目录中添加一个 `index.md` 文件。目录结构如下所示:
```shell
content
@@ -26,7 +27,7 @@ content
└── featured.png
```
Inside the article you can now add an image file (almost all formats are supported but we recommend `.png` or `.jpg`) that starts with `feature*`. Example below.
在文件夹内部,你可以添加一个 `feature*` 开头的特征图片(支持几乎所有格式,但推荐使用 `.png` `.jpg`)。目录结构如下所示:
```shell
content
@@ -35,4 +36,5 @@ content
└── featured.png
```
This will tell Blowfish that this article has a feature image that can be used both as a thumbnail across your website as well as for <a target="_blank" href="https://oembed.com/">oEmbed</a> cards across social platforms. As an example, you can try copy pasting the URL of this article into a platform that shows oEmbeds (e.g. Twitter, WhatsApp, Telegram, etc) and see what is displayed.
这将告诉 Blowfish 这篇文章有一个特征图片,这个图片可以在网站作为缩略图使用,也可以用于社交平台上的 <a target="_blank" href="https://oembed.com/">oEmbed</a> 卡片。
作为一个示例,你可以尝试将这篇文章的 URL 复制粘贴到一个可以显示 oEmbeds 的平台,如 Twitter、WhatsApp、Telegram等等。