Skip to content

Expose licenses listed on /licenses in a machine-readable format #434

Closed

Description

@benbalter

Since 5052d34 there is no machine-readable way to distinguish the prominence of e.g., MIT from WTFPL.

Before we had:

  • Featured
  • Normal
  • Variant
  • Hidden

Now we have:

  • Featured
  • Everything else

When used elsewhere, e.g., the GitHub API, licensee, it'd be useful to have the prominence implicit in the hard coded list in https://github.com/github/choosealicense.com/blob/gh-pages/licenses.html exposed in the licenses themselves.

I'm not sure what the name for that flag should be (intuitively, I think hidden: true as a default like we had before, and having hidden: false on those licenses makes sense, along with updating the template logic to be dynamic), but even having those featured licenses as an array in the template's YAML front matter (even if that wouldn't help expose the licenses) would feel better, from a DRY perspective (rather than hard coding them).

/cc @mlinksva

Activity

  1. benbalter commented on Jun 14, 2016

    @benbalter
    ContributorAuthor

    cc #398

  2. mlinksva commented on Jun 14, 2016

    @mlinksva
    Contributor

    I did think about ordering by # of conditions and filtering by hidden to make #386 but felt it just made the source for that page more obscure. But sure, having the ordering specified in the front matter of licenses.html or perhaps _config.yml could be useful so that ordering is available if someone wants to do something else with it. I'll think about that and maybe make a PR.

    I'll make a PR shortly to re-add hidden: false field on the licenses currently on /licenses because it is useful elsewhere.

  3. added a commit that references this issue on Jun 14, 2016
    cf79b35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions