mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'docs/add_release_notes_for_versions' into 'master'
docs: add release notes to versions See merge request espressif/esp-idf!24944
This commit is contained in:
commit
b59c1e2e9d
25
docs/_static/js/version_table.js
vendored
25
docs/_static/js/version_table.js
vendored
@ -38,29 +38,44 @@ $(document).ready(function() {
|
||||
return result + "/";
|
||||
};
|
||||
|
||||
function getReleaseNotesUrl(v){
|
||||
if (v.name.indexOf("release") !== 0) {
|
||||
let releaseNotesUrl = "https://github.com/espressif/esp-idf/releases/tag/" + v.name;
|
||||
return releaseNotesUrl;
|
||||
}
|
||||
}
|
||||
|
||||
old_ver_table = "";
|
||||
old_ver_table_row = "<tr>"
|
||||
let row_items = 0;
|
||||
const ITEMS_PER_ROW = 4;
|
||||
const ITEMS_PER_ROW = 3;
|
||||
|
||||
for (let i = 0; i < versions.length; i++) {
|
||||
let v = versions[i];
|
||||
let url = getVersionUrl(v);
|
||||
let releaseNotesUrl = getReleaseNotesUrl(v);
|
||||
|
||||
if (v.old) {
|
||||
old_ver_table_row += "<td><a href=\"" + url + "\">" + v.name + "</td>";
|
||||
if (releaseNotesUrl){
|
||||
old_ver_table_row += "<td><a href=\"" + url + "\">" + v.name + " - <a href=\"" + releaseNotesUrl + "\">Release Notes</a></td>";
|
||||
} else {
|
||||
old_ver_table_row += "<td><a href=\"" + url + "\">" + v.name + "</td>";
|
||||
}
|
||||
|
||||
row_items++;
|
||||
|
||||
if (row_items === ITEMS_PER_ROW) {
|
||||
old_ver_table_row += "</tr>"
|
||||
old_ver_table += old_ver_table_row
|
||||
old_ver_table_row += "</tr>";
|
||||
old_ver_table += old_ver_table_row;
|
||||
|
||||
/* Prepare a new row */
|
||||
old_ver_table_row = "<tr>"
|
||||
row_items = 0
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
old_ver_table_row += "</tr>";
|
||||
old_ver_table += old_ver_table_row;
|
||||
|
||||
$( "#version_table" ).append(old_ver_table);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user