From 4e89ea55c13649f83422a11501acf62fa6d87ba7 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Thu, 3 Oct 2024 20:41:20 -0400 Subject: [PATCH] [docsy] Reworked Spec page, including wildcard redirects (#88) --- .htmltest.yml | 5 ++- content/en/docs/get-started/contributor.md | 2 +- content/en/spec.md | 37 ++++++++++++++++++++++ content/en/specifications/specs.md | 31 ------------------ hugo.yaml | 2 +- netlify.toml | 12 +++---- 6 files changed, 45 insertions(+), 44 deletions(-) create mode 100644 content/en/spec.md delete mode 100644 content/en/specifications/specs.md diff --git a/.htmltest.yml b/.htmltest.yml index f9e2072..e8b6879 100644 --- a/.htmltest.yml +++ b/.htmltest.yml @@ -2,10 +2,9 @@ DirectoryPath: public CheckDoctype: false # Sadly, this is false only because of `static/google*.html` IgnoreAltMissing: true # FIXME IgnoreDirectoryMissingTrailingSlash: true # FIXME -IgnoreDirs: [_print] # FIXME +IgnoreDirs: IgnoreEmptyHref: true # FIXME IgnoreInternalEmptyHash: true # FIXME IgnoreInternalURLs: # list of paths IgnoreURLs: # list of regexs of paths or URLs to be ignored - - ^https://twitter.com/docsydocs$ - - ^/specs + - ^/specification/ diff --git a/content/en/docs/get-started/contributor.md b/content/en/docs/get-started/contributor.md index 64f9e99..6162d08 100644 --- a/content/en/docs/get-started/contributor.md +++ b/content/en/docs/get-started/contributor.md @@ -5,7 +5,7 @@ description: Learn how to contribute to TUF --- There are many opportunities to contribute to TUF project. You can contribute to -the [specification](/specifications/) or [documentation](/docs/). +the [specification](/specification/) or [documentation](/docs/). For guidance on how to contribute, see the [TUF Contributor Guide](https://github.com/theupdateframework/community/blob/main/CONTRIBUTING.md). diff --git a/content/en/spec.md b/content/en/spec.md new file mode 100644 index 0000000..37408a3 --- /dev/null +++ b/content/en/spec.md @@ -0,0 +1,37 @@ +--- +title: Specification +linkTitle: Spec +menu: { main: { weight: 35 } } +# See Netlify.toml for /specification/* redirect rules. +--- + +{{% blocks/cover title="Specification" height="auto" %}} + +{{% /blocks/cover %}} + +{{% blocks/section color="white" %}} + +The following specification versions are available: + +- [latest](/specification/latest/) +- [draft](/specification/draft/) +- [v1.0.33](/specification/v1.0.33/) +- [v1.0.32](/specification/v1.0.32/) +- [v1.0.31](/specification/v1.0.31/) +- [v1.0.30](/specification/v1.0.30/) +- [v1.0.29](/specification/v1.0.29/) +- [v1.0.28](/specification/v1.0.28/) +- [v1.0.27](/specification/v1.0.27/) +- [v1.0.26](/specification/v1.0.26/) +- [v1.0.25](/specification/v1.0.25/) +- [v1.0.24](/specification/v1.0.24/) +- [v1.0.23](/specification/v1.0.23/) +- [v1.0.22](/specification/v1.0.22/) +- [v1.0.20](/specification/v1.0.20/) +- [v1.0.19](/specification/v1.0.19/) +- [v1.0.18](/specification/v1.0.18/) +- [v1.0.17](/specification/v1.0.17/) + +This list is also available from [Spec versions](/specification/list/). + +{{% /blocks/section %}} diff --git a/content/en/specifications/specs.md b/content/en/specifications/specs.md deleted file mode 100644 index c76ade9..0000000 --- a/content/en/specifications/specs.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: Specification -linkTitle: Spec -menu: { main: { weight: 35 } } -cascade: - type: docs ---- - -The following specification versions are available: - -- [latest](https://theupdateframework.github.io/specification/latest/index.html) -- [draft](https://theupdateframework.github.io/specification/draft/index.html) -- [v1.0.33](https://theupdateframework.github.io/specification/v1.0.33/index.html) -- [v1.0.32](https://theupdateframework.github.io/specification/v1.0.32/index.html) -- [v1.0.31](https://theupdateframework.github.io/specification/v1.0.31/index.html) -- [v1.0.30](https://theupdateframework.github.io/specification/v1.0.30/index.html) -- [v1.0.29](https://theupdateframework.github.io/specification/v1.0.29/index.html) -- [v1.0.28](https://theupdateframework.github.io/specification/v1.0.28/index.html) -- [v1.0.27](https://theupdateframework.github.io/specification/v1.0.27/index.html) -- [v1.0.26](https://theupdateframework.github.io/specification/v1.0.26/index.html) -- [v1.0.25](https://theupdateframework.github.io/specification/v1.0.25/index.html) -- [v1.0.24](https://theupdateframework.github.io/specification/v1.0.24/index.html) -- [v1.0.23](https://theupdateframework.github.io/specification/v1.0.23/index.html) -- [v1.0.22](https://theupdateframework.github.io/specification/v1.0.22/index.html) -- [v1.0.20](https://theupdateframework.github.io/specification/v1.0.20/index.html) -- [v1.0.19](https://theupdateframework.github.io/specification/v1.0.19/index.html) -- [v1.0.18](https://theupdateframework.github.io/specification/v1.0.18/index.html) -- [v1.0.17](https://theupdateframework.github.io/specification/v1.0.17/index.html) - -This list is also available from -[Spec versions](https://theupdateframework.github.io/specification/). diff --git a/hugo.yaml b/hugo.yaml index 58a860b..eeae38e 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -42,7 +42,7 @@ languages: The Update Framework (TUF) maintains the security of software update systems, providing protection even against attackers that compromise the repository or signing keys. TUF provides a flexible framework and - [specification](/specs/) + [specification](/specification/latest) that developers can adopt into any software update system. projectAndGrants: | The TUF project is managed by the [Linux Foundation] under the [Cloud diff --git a/netlify.toml b/netlify.toml index 52b4500..2f9a76d 100644 --- a/netlify.toml +++ b/netlify.toml @@ -6,16 +6,12 @@ command = "npm run seq -- build:preview diff:check" command = "npm run seq -- build:production diff:check" [[redirects]] -from = "/specification/latest" -to = "https://theupdateframework.github.io/specification/latest/" - -[[redirects]] -from = "/specification/list" -to = "https://theupdateframework.github.io/specification/" +from = "/specification" +to = "/specification/latest/" [[redirects]] -from = "/specification" -to = "https://theupdateframework.github.io/specification/latest/" +from = "/specification/*" +to = "https://theupdateframework.github.io/specification/:splat" [[headers]] for = "/*"