为什么我的图像嵌入.MD不显示在Github(Why is my image embedded in

2019-10-31 08:43发布

假设,你必须有以下RMD(见../Christoph999/Test/blob/master/test.md

---
title: "Untitled"
author: "Myname"
date: "5 April 2019"
output:
  html_document:
    keep_md: yes
    number_sections: yes
    toc: yes
    toc_depth: 2
  pdf_document:
    number_sections: yes
    toc: yes
    toc_depth: '2'
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

text

![Some text here.](../project/pics/myimage.png?raw=true){width=400px}

text

我把一切都在图片的GitHub /project/pics/ (该文件.MD在/project ,当我查看.MD文件,但不显示图像。当我将鼠标移到标题它说

https://github.com/user/project/blob/project/pics/myimage.png?raw=true

什么是blob/出现? 当从RStudio运行,一切正常。 我会很感激,如果工程。 (我使用Firefox)

编辑文件夹结构看起来像

/project  
  /.git
  /pics  
    *myimage.png  
  * Rmd  

../project/pics/myimage.png应指向正确的位置?

Answer 1:

感谢对@richard Telfor,溶液

text

![Some text here.](pics/myimage.png?raw=true){width=400px}

text

请注意:代码不与PDF的工作,看到这里



文章来源: Why is my image embedded in .md not displayed on Github