From 96702b7b620c9b5076f987de60d59de0190899de Mon Sep 17 00:00:00 2001 From: Carmen Bianca BAKKER Date: Mon, 24 Jun 2024 11:26:10 +0200 Subject: [PATCH 1/2] Specification button points to latest spec again Now, to get a list of all specifications, an info box appears above every specification that takes you to the /specifications page. Signed-off-by: Carmen Bianca BAKKER --- site/config.toml | 2 +- site/i18n/en.json | 3 +++ site/layouts/_default/single.html | 5 +++++ site/layouts/partials/specifications.html | 8 ++++++++ 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 site/layouts/partials/specifications.html diff --git a/site/config.toml b/site/config.toml index 9c92f5ff..72381dbc 100644 --- a/site/config.toml +++ b/site/config.toml @@ -86,7 +86,7 @@ defaultContentLanguageInSubdir = true [[menu.main]] identifier = "spec" weight = 300 - url = "/specifications/" + url = "/spec/" [[menu.main]] identifier = "resources" weight = 500 diff --git a/site/i18n/en.json b/site/i18n/en.json index c4e0c420..7df3d0a2 100644 --- a/site/i18n/en.json +++ b/site/i18n/en.json @@ -79,5 +79,8 @@ }, "index_legal_text": { "other": "There are many tools that aid you in license compliance for software, many using databases and fuzzy heuristics. A REUSE-compliant project makes the jobs of legal experts and compliance officers much easier. Creating a bill of materials can be achieved with just one simple command. REUSE [does not replace other tools](comparison/), it is a long-awaited addition." + }, + "all_specifications": { + "other": "All versions of the specification can be found at <{{ .specifications }}>." } } diff --git a/site/layouts/_default/single.html b/site/layouts/_default/single.html index 098699b1..2f4f0d4c 100644 --- a/site/layouts/_default/single.html +++ b/site/layouts/_default/single.html @@ -8,6 +8,11 @@ {{ partial "nav.html" . }}
+ {{- $filepath := "/" }} + {{- with .File }}{{- with .Path }}{{ $filepath = . }}{{ end }}{{ end }} + {{ if hasPrefix $filepath "spec-" }} + {{ partial "specifications.html" . }} + {{ end }}

{{ .Page.Title }}

{{ if .Params.subtitle }}

{{ .Params.subtitle }}

{{ end }} {{ partial "translation.html" . }} diff --git a/site/layouts/partials/specifications.html b/site/layouts/partials/specifications.html new file mode 100644 index 00000000..53f1acec --- /dev/null +++ b/site/layouts/partials/specifications.html @@ -0,0 +1,8 @@ + +
+ {{ $specURL := ref . "/specifications" }} + {{ i18n "all_specifications" (dict "specifications" $specURL) | markdownify }} +
From ffb444d0f17d0d1c55ce847d6919e681d1321244 Mon Sep 17 00:00:00 2001 From: Carmen Bianca BAKKER Date: Mon, 24 Jun 2024 11:43:59 +0200 Subject: [PATCH 2/2] Use plural Signed-off-by: Carmen Bianca BAKKER --- site/content/en/specifications.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/en/specifications.md b/site/content/en/specifications.md index 294b2696..9c38d9f3 100644 --- a/site/content/en/specifications.md +++ b/site/content/en/specifications.md @@ -2,7 +2,7 @@ # SPDX-FileCopyrightText: 2024 Free Software Foundation Europe e.V. # SPDX-License-Identifier: CC-BY-SA-4.0 -title: "REUSE Specification" +title: "REUSE Specifications" --- These are the versions of the specification, listed from new to old: