diff --git a/_config.yml b/_config.yml index 84b39b77e7..d1399b448a 100644 --- a/_config.yml +++ b/_config.yml @@ -20,6 +20,9 @@ collections: output: true download: output: true + download_3: + output: true + permalink: /download/3.x/:name/index.html defaults: - scope: @@ -38,6 +41,11 @@ defaults: type: "download" values: layout: "download" + - scope: + path: "" + type: "download_3" + values: + layout: "download-3" # Plugins plugins: @@ -50,10 +58,6 @@ languages: ["en", "es"] exclude_from_localizations: ["assets", "storage"] default_lang: "en" -# Godot download version -stable_version: "3.5.1" -stable_version_date: "28 September 2022" - # Pagination (used by the blog) pagination: # Site-wide kill switch, disabled here it doesn't run at all diff --git a/_data/versions.yml b/_data/versions.yml new file mode 100644 index 0000000000..191237a947 --- /dev/null +++ b/_data/versions.yml @@ -0,0 +1,8 @@ +godot_3: + - name: "3.5.1" + flavor: "stable" + release_date: "28 September 2022" +godot_4: + - name: "4.0" + flavor: "stable" + release_date: "1 March 2023" diff --git a/_includes/footer.html b/_includes/footer.html index bbfb2c2fdd..faa18e21d3 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -102,11 +102,18 @@ const links = document.querySelectorAll('.set-os-download-url'); for (let i = 0; i < links.length; i++) { const link = links[i]; - link.href = "/download/windows"; - if (navigator.platform.indexOf('Mac') !== -1) { - link.href = "/download/macos"; - } else if (navigator.platform.indexOf('Linux') !== -1) { - link.href = "/download/linux"; + let link_slug = 'download'; + if ('version' in link.dataset && link.dataset['version'] === '3') { + link_slug = 'download/3.x'; } + + let link_platform = 'windows'; + if (navigator.platform.indexOf('Mac') !== -1) { + link_platform = 'macos'; + } else if (navigator.platform.indexOf('Linux') !== -1) { + link_platform = 'linux'; + } + + link.href = `/${link_slug}/${link_platform}`; } diff --git a/_includes/header.html b/_includes/header.html index 92ee8129f5..3ed88bc13b 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -13,9 +13,9 @@