Skip to content

Commit

Permalink
Add archive page for older LTS changelogs and update recent changelog…
Browse files Browse the repository at this point in the history
… page (#7746)

* Add archive page for older LTS changelogs and update recent changelog filtering

* Fix errors in PR checks

* Fix changelog pages: reverse recent and archived logic, update links for proper navigation between changelog-stable and changelog-stable-old

* Fix changelog logic: Stable shows latest 25 releases; Archived shows older ones and also moved the = partial('changelog-stable.html') to changelog-stable-old

* fix the reversing of changelog-stable and changelog-stable-old

* corrected the changelog-stable and changelog-stable-old to show the needed changes

* Update content/changelog-stable/index.html.haml

Co-authored-by: Kris Stern <[email protected]>

* Update content/changelog-stable-old/index.html.haml

Co-authored-by: Kris Stern <[email protected]>

* Updated content/changelog-stable-old/index.html.haml

Co-authored-by: Kris Stern <[email protected]>

* updated all the required suggestions

Co-authored-by: Kris Stern <[email protected]>

* changed 27 to 25 in main codes

Co-authored-by: Kris Stern <[email protected]>

* changed spells in index.html.haml

Co-authored-by: Zbynek Konecny <[email protected]>

* Applied suggestions from code review

Co-authored-by: Kevin Martens <[email protected]>

* Remove duplicate archive link and Renamed files for consistency with plural usage

* updated both index.html.haml to maintain the changed file names,Renamed files for consistency with plural usage and Remove duplicate archive link

* reverted the files back to original and updated their index files again

---------

Co-authored-by: Bruno Verachten <[email protected]>
Co-authored-by: Kris Stern <[email protected]>
Co-authored-by: Zbynek Konecny <[email protected]>
Co-authored-by: Kevin Martens <[email protected]>
Co-authored-by: Mark Waite <[email protected]>
  • Loading branch information
6 people authored Dec 14, 2024
1 parent eb27524 commit b8a67e9
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 11 deletions.
28 changes: 28 additions & 0 deletions content/changelog-stable-old/index.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
layout: changelog
title: Archived LTS Changelog
show_ratings: false
has_rss: false
actions:
<a class="app-button app-button--primary app-mobile-hide" href="/changelog-stable">
<ion-icon name="arrow-back-circle-outline"></ion-icon>
Back to Recent LTS Changelog
</a>
---

.ratings
- # Load older changelogs (all except the most recent 25, ordered correctly)
- archived_changelogs = site.changelogs[:lts].reverse.drop(25)
- archived_changelogs.each do |release|
%div
= partial('../_partials/release-header.html.haml', :release => release, :url => 'changelog-stable-old')
- if release.changes
%div.app-releases__list__items
= partial('../_partials/changelog-changes.html.haml', :changes => release.changes)
- else
%p No notable changes for this release.

.app-banner
This is the changelog archive. The changelog for recent releases can be found
%a{:href => '/changelog-stable/'}
in the main LTS changelog page.
27 changes: 16 additions & 11 deletions content/changelog-stable/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,27 @@ actions:
---

.ratings
- # source: https://github.com/jenkins-infra/jenkins.io/blob/master/content/_data/changelogs/lts.yml
- site.changelogs[:lts].reverse_each do | release |
- # Load the most recent 25 changelogs (latest first)
- recent_changelogs = site.changelogs[:lts].reverse.take(25)
- recent_changelogs.each do |release|
- if Gem::Version.new(release.version) <= Gem::Version.new(site.jenkins.stable)
%div
= partial('release-header.html.haml', :release => release, :url => 'changelog-stable')
- if release.changes and release.lts_changes and release.lts_baseline
= partial('../_partials/release-header.html.haml', :release => release, :url => 'changelog-stable')
- if release.changes && release.lts_changes && release.lts_baseline
.app-releases__notable-changes{:style => "margin-top: 15px"}
-# TODO figure out how to get rid of this
= "Changes since #{release.lts_baseline}"
%div.app-releases__list__items
= partial('changelog-changes.html.haml', :changes => release.changes)
- if release.changes
%div.app-releases__list__items
= partial('../_partials/changelog-changes.html.haml', :changes => release.changes)

- if release.changes and release.lts_changes
- if release.changes && release.lts_changes
.app-releases__notable-changes
= "Notable changes since #{release.lts_predecessor}"
- if release.lts_predecessor
= "Notable changes since #{release.lts_predecessor}"
%div.app-releases__list__items
= partial('changelog-changes.html.haml', :changes => release.lts_changes)
= partial('../_partials/changelog-changes.html.haml', :changes => release.lts_changes)

= partial('changelog-stable.html')
.app-banner
The changelog of historical releases can be found
%a{:href => '/changelog-stable-old/'}
in the LTS changelog archive.

0 comments on commit b8a67e9

Please sign in to comment.