From 052775b507c73e1003e9501b26e53ef4379b8dad Mon Sep 17 00:00:00 2001 From: Alejandro Lazaro Date: Sat, 11 Jan 2025 19:49:23 +0100 Subject: [PATCH] feat: add license URL --- .gitignore | 2 ++ data/tools.json | 2 ++ layouts/_default/home.html | 2 +- main.go | 8 +++++++- static/tools.json | 4 +++- 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c4b387a..7d0d9c4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .hugo_build.lock public/ +# go binary +main diff --git a/data/tools.json b/data/tools.json index e81c652..4562cb8 100644 --- a/data/tools.json +++ b/data/tools.json @@ -1,6 +1,7 @@ { "opentofu": { "license": "MPL-2.0", + "licenseURL": "https://github.com/opentofu/opentofu/blob/main/LICENSE", "registry": "https://search.opentofu.org/", "features": [ { @@ -56,6 +57,7 @@ }, "terraform": { "license": "BUSL-1.1", + "licenseURL": "https://github.com/hashicorp/terraform/blob/main/LICENSE", "registry": "https://registry.terraform.io/", "features": [ { diff --git a/layouts/_default/home.html b/layouts/_default/home.html index 29144cd..5ec1d2e 100644 --- a/layouts/_default/home.html +++ b/layouts/_default/home.html @@ -25,7 +25,7 @@

Can I TF

License {{ range $toolName, $toolData := .Site.Data.tools }} - {{ $toolData.license }} + {{ $toolData.license }} {{- end }} {{- /* Loop through Registry */ -}} diff --git a/main.go b/main.go index 8182279..df3c812 100644 --- a/main.go +++ b/main.go @@ -24,6 +24,10 @@ var schemaData = []byte(`{ "license": { "type": "string" }, + "licenseURL": { + "type": "string", + "format": "uri" + }, "registry": { "type": "string", "format": "uri" @@ -57,6 +61,7 @@ var schemaData = []byte(`{ var tools = []byte(`{ "opentofu": { "license": "MPL-2.0", + "licenseURL": "https://github.com/opentofu/opentofu/blob/main/LICENSE", "registry": "https://search.opentofu.org/", "features": [ { @@ -112,6 +117,7 @@ var tools = []byte(`{ }, "terraform": { "license": "BUSL-1.1", + "licenseURL": "https://github.com/hashicorp/terraform/blob/main/LICENSE", "registry": "https://registry.terraform.io/", "features": [ { @@ -137,7 +143,7 @@ var tools = []byte(`{ "version": "1.7" }, { - "name": "Stacks", + "name": "Stacks*", "version": "1.9", "url": "https://developer.hashicorp.com/terraform/language/stacks" }, diff --git a/static/tools.json b/static/tools.json index b1ecda0..4562cb8 100644 --- a/static/tools.json +++ b/static/tools.json @@ -1,6 +1,7 @@ { "opentofu": { "license": "MPL-2.0", + "licenseURL": "https://github.com/opentofu/opentofu/blob/main/LICENSE", "registry": "https://search.opentofu.org/", "features": [ { @@ -56,6 +57,7 @@ }, "terraform": { "license": "BUSL-1.1", + "licenseURL": "https://github.com/hashicorp/terraform/blob/main/LICENSE", "registry": "https://registry.terraform.io/", "features": [ { @@ -81,7 +83,7 @@ "version": "1.7" }, { - "name": "Stacks", + "name": "Stacks*", "version": "1.9", "url": "https://developer.hashicorp.com/terraform/language/stacks" },