mirror of
https://github.com/olivierlacan/keep-a-changelog.git
synced 2025-07-29 16:54:12 +02:00
Prevent 1.1.0 from being $latest_version for now
We don't quite yet want to redirect to this version although it will be good to be able to test it. # Title # Tell me everything! # Co-authors (they will be credited on GitHub as well) # Co-authored-by: Carolina Powers <carolinapoloni@gmail.com> # Co-authored-by: Meg Kline-Tuls <meglktuls@gmail.com> # Co-authored-by: Will <will-soto@pluralsight.com> # Co-authored-by: thatchej <jaron-thatcher@pluralsight.com>
This commit is contained in:
parent
7221c2cd10
commit
3a7298570a
@ -5,8 +5,11 @@
|
|||||||
# ----- Site ----- #
|
# ----- Site ----- #
|
||||||
# Last version should be the latest English version since the manifesto is first
|
# Last version should be the latest English version since the manifesto is first
|
||||||
# written in English, then translated into other languages later.
|
# written in English, then translated into other languages later.
|
||||||
$versions = (Dir.entries("source/en").sort - %w[. ..])
|
$versions = Dir.glob("source/en/*").map{ |e| e.sub("source/en/","") }.sort
|
||||||
$last_version = $versions.last
|
# NOTE: for now, while 1.1.0 is in development let's pin the latest
|
||||||
|
# version to 1.0.0 manually.
|
||||||
|
# $last_version = $versions.last
|
||||||
|
$last_version = "1.0.0"
|
||||||
$previous_version = $versions[$versions.index($last_version) - 1]
|
$previous_version = $versions[$versions.index($last_version) - 1]
|
||||||
|
|
||||||
# This list of languages populates the language navigation.
|
# This list of languages populates the language navigation.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
description: Keep a Changelog
|
description: Keep a Changelog
|
||||||
title: Keep a Changelog
|
title: Keep a Changelog
|
||||||
language: en
|
language: en
|
||||||
version: 1.0.0
|
version: 1.1.0
|
||||||
---
|
---
|
||||||
|
|
||||||
- changelog = "https://github.com/olivierlacan/keep-a-changelog/blob/master/CHANGELOG.md"
|
- changelog = "https://github.com/olivierlacan/keep-a-changelog/blob/master/CHANGELOG.md"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
// Variables
|
// Variables
|
||||||
- latest_version = current_page.metadata[:page][:version] == $last_version
|
- latest_version = current_page.metadata[:page][:version] == $last_version
|
||||||
|
- legacy_version = current_page.metadata[:page][:version] < $last_version
|
||||||
- language_code = current_page.metadata[:page][:language]
|
- language_code = current_page.metadata[:page][:language]
|
||||||
- versions = Dir.entries("source/#{language_code}") - %w[. ..]
|
- versions = Dir.entries("source/#{language_code}") - %w[. ..]
|
||||||
- current_version = current_page.metadata[:page][:version]
|
- current_version = current_page.metadata[:page][:version]
|
||||||
@ -32,10 +33,10 @@
|
|||||||
|
|
||||||
%link{ rel: "stylesheet", href: "https://fonts.googleapis.com/css?family=Muli:400,700" }
|
%link{ rel: "stylesheet", href: "https://fonts.googleapis.com/css?family=Muli:400,700" }
|
||||||
= stylesheet_link_tag '//fonts.googleapis.com/css?family=Source+Code+Pro:400,700'
|
= stylesheet_link_tag '//fonts.googleapis.com/css?family=Source+Code+Pro:400,700'
|
||||||
- if latest_version
|
- if legacy_version
|
||||||
= stylesheet_link_tag 'application'
|
|
||||||
- else
|
|
||||||
= stylesheet_link_tag 'legacy'
|
= stylesheet_link_tag 'legacy'
|
||||||
|
- else
|
||||||
|
= stylesheet_link_tag 'application'
|
||||||
= javascript_include_tag 'all', defer: true
|
= javascript_include_tag 'all', defer: true
|
||||||
|
|
||||||
%body
|
%body
|
||||||
@ -52,7 +53,7 @@
|
|||||||
= available_translation
|
= available_translation
|
||||||
|
|
||||||
.main{ role: "main" }
|
.main{ role: "main" }
|
||||||
- if !latest_version
|
- if !latest_version && legacy_version
|
||||||
- if versions.include?($last_version)
|
- if versions.include?($last_version)
|
||||||
%p.newer
|
%p.newer
|
||||||
- if $languages[language_code][:new]
|
- if $languages[language_code][:new]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user