summaryrefslogtreecommitdiff
path: root/themes/blowfish/exampleSite/content/samples/thumbnail_sample/index.ja.md
blob: af606f12583e96ac08449591e2da862f61fdc7eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
title: "サムネイル"
date: 2022-09-26
draft: false
description: "記事のサムネイルを変更する。"
slug: "thumbnail_sample"
tags: ["thumbnail", "sample"]
summary: "A quick example of how to start using Thumbnails in your artciles."
type: 'sample'
---

記事でどのようにサムネイルを利用するかの簡単な例です。

記事の平均的なディレクトリが以下のようなものだとしたら: 

```shell
content
└── awesome_article.md
```

単一の markdown ファイルから、フォルダーに入っている形式に変更する必要があります。記事の名前と同一のディレクトリを作成し、その中に `index.md` ファイルを作成します。このようにすると、以下のような構成になります。

```shell
content
└── awesome_article
    └── featured.png
```

記事内に `feature*` から始まる名前の画像ファイル (ほとんど全てのフォーマットを対応していますが、 `.png` か `.jpg` を推奨しています) を追加できます。以下が例です。

```shell
content
└── awesome_article
    ├── index.md
    └── featured.png
```

これによって Blowfish は、記事のサムネイルをウェブサイトまたは SNS の <a target="_blank" href="https://oembed.com/">oEmbed</a> カードの紹介画像として利用できます。例としては、この記事の URL を oEmbeds を表示するプラットフォーム (例: Twitter, WhatsApp, Telegram など) にコピーペーストどのように表示されるかをご覧ください。