Skip to content

Commit

Permalink
Merge pull request #77 from carmenbianca/fix-specifications
Browse files Browse the repository at this point in the history
Specification button points to latest spec again
  • Loading branch information
carmenbianca authored Jun 24, 2024
2 parents c4ed2b7 + ffb444d commit 0972c6b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion site/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ defaultContentLanguageInSubdir = true
[[menu.main]]
identifier = "spec"
weight = 300
url = "/specifications/"
url = "/spec/"
[[menu.main]]
identifier = "resources"
weight = 500
Expand Down
2 changes: 1 addition & 1 deletion site/content/en/specifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions site/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}>."
}
}
5 changes: 5 additions & 0 deletions site/layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
{{ partial "nav.html" . }}
<div class="content">
<div class="clearfix"></div>
{{- $filepath := "/" }}
{{- with .File }}{{- with .Path }}{{ $filepath = . }}{{ end }}{{ end }}
{{ if hasPrefix $filepath "spec-" }}
{{ partial "specifications.html" . }}
{{ end }}
<h1>{{ .Page.Title }}</h1>
{{ if .Params.subtitle }}<h2 class="subtitle">{{ .Params.subtitle }}</h2>{{ end }}
{{ partial "translation.html" . }}
Expand Down
8 changes: 8 additions & 0 deletions site/layouts/partials/specifications.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!--
SPDX-License-Identifier: MIT
SPDX-FileCopyrightText: 2024 Free Software Foundation Europe e.V. <https://fsfe.org>
-->
<div class="alert alert-info">
{{ $specURL := ref . "/specifications" }}
{{ i18n "all_specifications" (dict "specifications" $specURL) | markdownify }}
</div>

0 comments on commit 0972c6b

Please sign in to comment.