Git Product home page Git Product logo

Comments (11)

captn3m0 avatar captn3m0 commented on May 24, 2024 1

from endoflife.date.

captn3m0 avatar captn3m0 commented on May 24, 2024 1

That works as well!

I wasn't sure about this because YAML is very unforgiving (and hard to type) with array of maps. But we can figure that out.

from endoflife.date.

jhnferraris avatar jhnferraris commented on May 24, 2024

@captn3m0 Do you mean that even if we write the release array this way:

PostgreSQL snippet

releases:
  "11":
    release: 2018-10-18
    eol: 2023-11-09
    latest: 11.3
  "10":
    release: 2017-10-05
    eol: 2022-11-10
    latest: 10.8
  "9.6":
    release: 2016-09-29
    eol: 2021-11-11
    latest: 9.6.13
  "9.5":
    release: 2016-01-07
    eol: 2021-02-11
    latest: 10.2.24
  "9.4":
    release: 2014-12-08
    eol: 2020-02-13
    latest: 9.4.22

or this way:

Node.JS snippet

releases:
  v8:
    release: 2017-10-31
    lts: true
    support: 2019-01-01
    eol: 2019-12-31
    latest: v8.16.0
  v10:
    release: 2018-04-24
    lts: true
    support: 2020-04-01
    eol: 2021-04-01
    latest: v10.15.3
  v12:
    release: 2019-10-22
    lts: true
    support: 2021-04-01
    eol: 2021-04-01
    latest: v12.3.1
  v14:
    release: 2020-10-20
    lts: true
    support: 2022-04-01
    eol: 2023-04-01

.. the page will always show the latest release?

from endoflife.date.

captn3m0 avatar captn3m0 commented on May 24, 2024

Yes. I've put a comment on the contributing doc to enforce higher=newer, but even in case where it gets missed, the order should be by release date.

I was also considering ignoring EoL releases beyond a certain date, so as to avoid clutter. Thoughts?

Aside: Sent you a contributor invite for the repo. πŸ‘

from endoflife.date.

jhnferraris avatar jhnferraris commented on May 24, 2024

@captn3m0 I can try this one out.

Thanks for the invite!

from endoflife.date.

captn3m0 avatar captn3m0 commented on May 24, 2024

The primary issue was with Jekyll not supporting sorting on maps.

It might be easier to write a jekyll filter that does the sort.

from endoflife.date.

jhnferraris avatar jhnferraris commented on May 24, 2024

@captn3m0 I was planning to keep it simple since I'm quite new with Jekyll and Ruby.

What do you think of this?

{% assign sortedReleases = page.releases.sort {|x,y| y[1].release <=> x[1].release } %}

https://stackoverflow.com/a/5710429/2797942

This does not work yet tho. I'm getting a Liquid syntax error when I execute that.

from endoflife.date.

jhnferraris avatar jhnferraris commented on May 24, 2024

@captn3m0 I see. I'll experiment on that. Might take some time on my end tho.

from endoflife.date.

jhnferraris avatar jhnferraris commented on May 24, 2024

@captn3m0 I have a WIP for the plugin

module Jekyll
  module Releases
    def sort_releases(input)
        # puts input
        input.each { |x| puts x[1]['release'] }
        # input.sort {|x,y| y[1].release <=> x[1].release }
    end
  end
end

Liquid::Template.register_filter(Jekyll::Releases)

Turns out that not all tools have release dates (i.e. django) written on them. Any suggestions on how I should approach this?

Also I noticed filemaker.md has a key released, what's the difference between release and released?

from endoflife.date.

jhnferraris avatar jhnferraris commented on May 24, 2024

Looking into a different perspective, I manage to have a solution on forcing an order of the release dates. However, it will change how the releases will be structured.

Step 1: "Updating the .md file"

releases:
  - releaseVersion: 'v3.8'
    release: 2018-06-26
    latest: v3.8.2
    eol: 2020-05-01
  - releaseVersion: 'v3.9'
    release: 2019-01-29
    latest: v3.9.4
    eol: 2021-01-01
  - releaseVersion: 'v3.7'
    release: 2017-11-30
    latest: v3.7.0
    eol: 2019-11-01

Step 2: And luckily the release versions of the current tools supported are highly sortable. All I had to do is this:

{{ page.releases | sort: 'releaseVersion' | reverse }}

Thoughts?

from endoflife.date.

jhnferraris avatar jhnferraris commented on May 24, 2024

Looks the dynamic sort support works. Closing this.

from endoflife.date.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.