在GitHub上查看PDF文件时,似乎没有办法让浏览器只显示文件而不是下载文件。
这些链接都不起作用,这是我唯一能够找到的链接(或者是从使用源代码的行为中派生出来的):
发布于 2015-05-13 17:36:00
截至2015年3月17日,GitHub现在将PDF文档内联地呈现在web界面中。
参考资料:PDF浏览
发布于 2015-05-23 01:34:02
使用Google查看器和url类似:
https://docs.google.com/viewer?url=${link_to_raw_pdf}
例如:
https://docs.google.com/viewer?url=https://raw.githubusercontent.com/degoes-consulting/lambdaconf-2015/master/speakers/jdegoes/intro-purescript/presentation.pdf
发布于 2013-08-17 04:35:16
Github对PDF使用content-disposition: attachment
,它在github.com上自动下载文件。您可以在GitHub提供的静态页面上承载该文件,该页面可以链接到该文件,并在更新PDF时进行更新。为此,您可以看到github页面。
摘要
USERNAME.github.io
的回购。git checkout gh-pages
git checkout master -- 'docs/*.pdf'
中。[Intro.pdf](http://USERNAME.github.io/REPONAME/docs/Intro.pdf)
的这些PDF的链接。https://webapps.stackexchange.com/questions/48061
复制相似问题