我可以链接到GitHub wiki下载的文件(PDF除外)吗? [英] Can I link to a file for downloading (other than PDF) in a GitHub wiki?

查看:220
本文介绍了我可以链接到GitHub wiki下载的文件(PDF除外)吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用以下链接至PDF文件时:

[download this](file.pdf)



它下载pdf文件。我有一个Excel工作簿,我想允许某人下载使用:



[download this](file.xlsx)



当我点击它时,需要我在wiki中创建一个新页面。是否有任何可以添加的标记语法来标识链接是要下载的内容?



谢谢!

解决方案

首先,尝试在你的wiki中制作一个文件子目录,并将文件放在那里。



我试过使用html锚标记

 < a href =files / file.csvdownload =file.csv>下载此< /一个> 

而不是降价链接语法

 [download this](files / file.csv)

但是看起来GitHub wiki会从anchor标签中删除下载属性。



最后,我将我的电子表格压缩到zip文件中,并将markdown链接指向zip文件。

  [下载此文件](files / file.csv.zip)


When you link to a PDF file using:

[download this](file.pdf)

it downloads the pdf file. I have an excel workbook that I'd like to allow someone to download using:

[download this](file.xlsx)

When I click it, it takes me to create a new page in the wiki. Is there any markdown syntax I can add that identifies the link as something to download?

If I have to, I can save the excel workbook as a PDF, but it's not going to be pretty.

Thank you!

解决方案

First, try making a files subdirectory in your wiki, and putting your files in there.

I tried using an html anchor tag

<a href="files/file.csv" download="file.csv">download this</a>

instead of the markdown link syntax

[download this](files/file.csv)

but it seems that GitHub wiki strips out the download attribute from the anchor tag.

In the end, I zipped my spreadsheet in a zip file and had the markdown link point to the zip file.

[download this](files/file.csv.zip)

这篇关于我可以链接到GitHub wiki下载的文件(PDF除外)吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆