Skip to content

Commit bac48cd

Browse files
authored
Merge pull request astropy#467 from astrofrog/js-pypi-version
Show latest core package version from PyPI
2 parents 5d2e134 + 8f26af2 commit bac48cd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

index.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
<!-- Meow woof -->
2020
<script>
2121
window.onload = function() {
22+
23+
$.getJSON('https://pypi.org/pypi/astropy/json', function(data) {
24+
document.getElementById('core-package-version').innerHTML = 'Current Version: ' + data.info.version;
25+
});
26+
27+
2228
var today = new Date();
2329
var month = today.getMonth() + 1;
2430
var date = today.getDate();
@@ -35,6 +41,7 @@
3541
dogeImg.src = 'images/astropy_doge.png';
3642
dogeImg.alt = 'wow so open very python';
3743
}
44+
3845
};
3946
</script>
4047

@@ -104,7 +111,7 @@
104111

105112
<section class="whatsnew"><div id="prenew"></div>
106113
What's new in <a href="http://docs.astropy.org/en/stable/whatsnew/5.0.html">Astropy 5.0?</a>
107-
<p class="version">Current Version: 5.0.1</p>
114+
<p class="version" id="core-package-version"></p>
108115

109116
</section>
110117

0 commit comments

Comments
 (0)