Github gist editing without changing URL

后端 未结 6 1606
轻奢々
轻奢々 2021-01-31 16:12

I have a gist with some javascript code in a script tag, like so:



        
6条回答
  •  南笙
    南笙 (楼主)
    2021-01-31 16:53

    In case of gist,
    https://raw.github.com/gist/[gist_id] OR
    https://gist.github.com/[user_name]/[gist_id]/raw(which is more likely to be an unique URI.)
    returns first file from the gist.

    For gist with multiple files, https://raw.github.com/gist/[gist_id]/[file_name]

    The url works even when you change the filename.

    e.g. https://raw.github.com/gist/4636655 https://raw.github.com/gist/4636655/imdb-getglue.js

提交回复
热议问题