Git include: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
Therefore, you also need to make a [http://en.wikipedia.org/wiki/Wikipedia:Purge Purge button], so that the wiki will fetch new code. | Therefore, you also need to make a [http://en.wikipedia.org/wiki/Wikipedia:Purge Purge button], so that the wiki will fetch new code. | ||
<nowiki>[http://www.pymolwiki.org/index.php | <nowiki> [http://www.pymolwiki.org/index.php/Git_include?action=purge Press here to refresh script from Github.] </nowiki> | ||
= Example = | |||
== Python Code == | == Python Code == | ||
This code has been put under version control. In the project, [http://www.pymolwiki.org/index.php/Git_intro Pymol-script-repo]. | This code has been put under version control. In the project, [http://www.pymolwiki.org/index.php/Git_intro Pymol-script-repo]. <br> | ||
[http://www.pymolwiki.org/index.php/Git_include?action=purge Press here to refresh script from Github.] | |||
<include src="https://raw.github.com/Pymol-Scripts/Pymol-script-repo/master/README" highlight="python" /> | |||
Latest revision as of 06:41, 3 December 2011
Use of module include
You write in wiki like this
<include src="https://raw.github.com/Pymol-Scripts/Pymol-script-repo/master/README" highlight="python" />
The include module has been restricted to only accept pages from:
https://raw.github.com/Pymol-Scripts/Pymol-script-repo/master/*
The wiki page will not automatically get changes to the code, if the code is update at the Github. This is because, that the code gets cached at the server.
Therefore, you also need to make a Purge button, so that the wiki will fetch new code.
[http://www.pymolwiki.org/index.php/Git_include?action=purge Press here to refresh script from Github.]
Example
Python Code
This code has been put under version control. In the project, Pymol-script-repo.
Press here to refresh script from Github. <include src="https://raw.github.com/Pymol-Scripts/Pymol-script-repo/master/README" highlight="python" />