The index pages for spins.fedoraproject.org and labs.fedoraproject.org now appear to have each release along with its description hardcoded. This means that means that adding a new spin or labs involves copypasting a block and changing all relevant information. In addition, anybody wishing to gather information about the available releases (such as Fedora Media Writer, I believe) is forced to scrape the list or just keep an up to date mirror with the information.
I propose including a JSON or YAML with the release information, and generating the website with a parametric for loop using that. For example, I would like to replace
<div class="high kde"> <div class="row"> <div class="col-xs-10 col-xs-offset-1 text-center top-space"> <a href="/${lang}/kde"><img class="screenshot" src="${path}/static/images/screenshots/screenshot-kde.jpg" alt="KDE Screenshot" /></a> </div> </div> <div class="row"> <div class="col-xs-10 col-xs-offset-1 text-center"> <p class="screenshot bottom-border"><a href="/${lang}/kde"><img class="spin-banner" src="${path}/static/images/kde-banner.png" alt="KDE banner" /></a><br /> <span class="grey">${_('A complete, modern desktop built using the KDE Plasma Desktop.')}</span></p> </div> </div> </div> <div class="high"> <div class="row"> <div class="col-xs-10 col-xs-offset-1 text-center top-space"> <a href="/${lang}/xfce"><img class="screenshot" src="${path}/static/images/screenshots/screenshot-xfce.jpg" alt="Xfce Screenshot" /></a> </div> </div> <div class="row"> <div class="col-xs-10 col-xs-offset-1 text-center"> <p class="screenshot bottom-border"><a href="/${lang}/xfce"><img class="spin-banner" src="${path}/static/images/xfce-banner.png" alt="Xfce banner" /></a><br /> <span class="grey">${_('A complete, well-integrated Xfce Desktop.')}</span></p> </div> </div> </div>
with
kde: shortname: KDE name: KDE Plasma Desktop description: A complete, modern desktop built using the KDE Plasma Desktop. xfce: shortname: XFCE name: XFCE Desktop description: A complete, well-integrated Xfce Desktop.
The gettext/i18n engine would have to be updated to translate strings gathered from the YAML file.
If this works out, I believe it could be extended to generating the individual release pages as well.
Anything important I'm missing? I'm willing to have a go at this if greenlighted.
This sounds like a worthwhile proposal. It should simplify the workflow and ability to add new spins/labs to those sites.
Thank you, I have created the parametrize-spins branch to give you time to work on the yaml stuff. It's a very nice proposal.
Login to comment on this ticket.