Doorknob Doorknob - 1 year ago 116
Javascript Question

Github gist editing without changing URL

I have a gist with some javascript code in a

tag, like so:

<script src=""></script>

And I will need to keep editing the JS file on github. However, when you edit a gist it changes the URL of the gist. How do I keep the same URL?

Answer Source

Gist changed the path to this file pattern:<USER_NAME>/<GIST_ID>/raw/<GIST_REVISION_ID>/<GIST_FILE_NAME>

You will notice that now the top answers' links are 404'ing.

Simply apply this new pattern and voilĂ !<USER_NAME>/<GIST_ID>/raw/<GIST_FILE_NAME>

For instance:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download