是否有gist文件最新版本的永久链接? [英] Is there a permalink to the latest version of gist files?
问题描述
我创建了一个包含两个文件的要点,我想将其原始版本用作查询其内容的应用程序的参考.这些内容将在GitHub上更新.
I created a gist with two files, the raw version of which I would like to use as a reference for an application which will query their contents. These contents will be updated on GitHub.
但是我发现文件的URL随着要旨的每个版本而变化.是否有一个永久链接指向要点文件的最新版本?
I found however that the URL of the file changes with each version of the gist. Is there a permalink which would point to the latest version of a file in a gist?
推荐答案
原始要旨网址遵循以下模式:
Raw gist URLs follow the pattern below:
https://gist.githubusercontent.com/[gist username]/[gist ID]/raw/[gist commit ID]/[file name]
要查看最新版本,只需删除 [要提交的ID]
部分:
To view the latest version, simply remove the [gist commit ID]
part:
https://gist.githubusercontent.com/[gist username]/[gist ID]/raw/[file name]
例如
https://gist.githubusercontent.com/mwek/9962f97f3bde157fd5dbd2b5dd0ec3ca/raw/user.js
请记住,端点已缓存,因此您的更新可能会稍有延迟地可见.
Keep in mind that the endpoint is cached, so your updates may be visible with a slight delay.
这篇关于是否有gist文件最新版本的永久链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!