mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
Merge remote-tracking branch 'weaxs/translations-v1' into translations-v1
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
---
|
||||
title: "Thumbnails"
|
||||
title: "缩略图"
|
||||
date: 2020-08-10
|
||||
draft: false
|
||||
description: "Turn on thumbnails for your articles."
|
||||
description: "为你的文章配置缩略图。"
|
||||
slug: "thumbnails"
|
||||
tags: ["thumbnail", "config", "docs"]
|
||||
series: ["Documentation"]
|
||||
tags: ["缩略图", "配置", "文档"]
|
||||
series: ["文档集"]
|
||||
series_order: 6
|
||||
---
|
||||
|
||||
## Thumbnails
|
||||
## 缩略图
|
||||
|
||||
Blowfish was enhanced in order to make it easy to add visual support to your posts. To do so, you just need to place an image file (almost all formats are supported but we recommend `.png` or `.jpg`) that starts with `feature*` inside your article's main directory, as shown in the example below.
|
||||
Blowfish 对视觉支持进行了增强,可以让你轻松地为文章添加缩略图。你只需要将一个以 `feature*` 开头的图像文件(支持几乎所有格式,但更推荐 `.png` 或 `.jpg`)放置在文章所在的目录中,如下面所示:
|
||||
|
||||
```shell
|
||||
content
|
||||
@@ -20,18 +20,18 @@ 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.
|
||||
这将告诉 Blowfish 这篇文章有一个特征图片,这个图片可以在网站作为缩略图使用,也可以用于社交平台上的 <a target="_blank" href="https://oembed.com/">oEmbed</a> 卡片。
|
||||
|
||||
## Folder Structure
|
||||
## 文件结构
|
||||
|
||||
If you are using single `.md` files for your articles and have a file structure similar to this:
|
||||
如果你仅仅使用一个 `.md` 文件作为文章,文件结构如下所示:
|
||||
|
||||
```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
|
||||
@@ -39,8 +39,8 @@ content
|
||||
└── index.md
|
||||
```
|
||||
|
||||
Then you just need to add an image like explained earlier. If you want to see a sample of this, you can consult [this sample]({{< ref "thumbnail_sample" >}}).
|
||||
然后你只需要像之前那样添加一个特征图片。如果你想看示例,你可以参 [这个示例]({{< ref "thumbnail_sample" >}})。
|
||||
|
||||
## Hero Images
|
||||
## Hero 图片
|
||||
|
||||
Thumbnails will be used by default as hero images within each article. Use the global `article.showHero` or the front-matter parameter `showHero` to control this feature across the entire site or for each specific post. If you want to override the style of the hero image, you can create a file called `hero.html` in `./layouts/partials/` that will override the original partial from the theme.
|
||||
缩略图将默认用作每篇文章的 hero 图片。开启此功能,可以使用全局的 `article.showHero` 参数来控制整个站点所有文章,或者扉页参数 `showHero` 来控制其中一个文章。如果你想覆盖 hero 图片的样式,你可以在 `./layouts/partials/` 文件夹中创建一个名为 `hero.html` 的文件,它会覆盖主题中的默认部分。
|
||||
|
||||
Reference in New Issue
Block a user