首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在blogdown帖子的标题中包含图像

如何在blogdown帖子的标题中包含图像
EN

Stack Overflow用户
提问于 2020-06-12 07:17:49
回答 1查看 421关注 0票数 0

我正在使用Hugo的学术主题在R.

我使用一个RMarkdown文件创建了一个博客文章。如果我有兴趣在文章的标题中插入图片,我应该将它保存到文件夹结构中的哪个路径,以及如何将它包含在我的YAML/markdown代码中?

我的YAML如下:

代码语言:javascript
复制
---
title: "Do oil prices explain the South African Rand's Performance?"
author: "Tangeni Shatiwa"
date: 2020-06-11T21:13:14-05:00
tags: ["South African Rand", "Brent Crude Oil", "Global Uncertainty","Non-Linear Spline Regression"]
output: html_document
---

理想情况下,我希望在我的帖子内容开始之前,在标题下面出现一张图片。

蒂娅!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-06-12 07:49:16

这是可能的!您可以在文件夹中包含名为featured.jpg (或featured.png)的文件和post标记文件。

然后,您只调整YAML标题:

代码语言:javascript
复制
---
title: "Do oil prices explain the South African Rand's Performance?"
author: "Tangeni Shatiwa"
date: 2020-06-11T21:13:14-05:00
tags: ["South African Rand", "Brent Crude Oil", "Global Uncertainty","Non-Linear Spline Regression"]
output: html_document
image:
  caption: "Oil can"
  focal_point: "Center"
  alt_text: This is a picture of oil can.
---

它被称为特色图像,您可以在文档中阅读更多选项。它看起来类似于这个职位 (参见源代码)。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62339394

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档