Add a dropdown for selecting a specific version

This commit is contained in:
Robbie Trencheny
2019-03-09 14:33:15 -08:00
parent bdbece9f3f
commit c22b20094d
2 changed files with 17 additions and 1 deletions

View File

@@ -70,6 +70,17 @@ module Jekyll
def canonical_url(input)
full_url(input).sub(/index\.\w+$/i, '')
end
# Sort an array of semvers
def semver_sort(input)
input.sort_by { |v|
val = v['name']
if val == "pre 0.7"
val = "0.6"
end
Gem::Version.new(val)
}
end
end
end