We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e16d4f3 commit 19b34feCopy full SHA for 19b34fe
docs/index.html
@@ -87,6 +87,7 @@
87
</div>
88
<script>
89
const RusfmtTagsUrl = 'https://api.github.com/repos/rust-lang/rustfmt/tags';
90
+ const RustfmtLatestUrl = 'https://api.github.com/repos/rust-lang/rustfmt/releases/latest';
91
const UrlHash = window.location.hash.replace(/^#/, '');
92
const queryParams = new URLSearchParams(window.location.search);
93
const searchParam = queryParams.get('search');
@@ -112,6 +113,16 @@
112
113
scrolledOnce: false,
114
},
115
asyncComputed: {
116
+ async updateVersion() {
117
+ let latest;
118
+ try {
119
+ latest = (await axios.get(RustfmtLatestUrl)).data;
120
+ } catch(err) {
121
+ console.log(err);
122
+ return;
123
+ }
124
+ this.version = latest.name;
125
+ },
126
async outputHtml() {
127
if (this.version !== this.oldVersion) {
128
const ConfigurationMdUrl =
0 commit comments