Skip to content

Commit

Permalink
[docsy] Reworked Spec page, including wildcard redirects (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin authored Oct 4, 2024
1 parent d5adaa0 commit 4e89ea5
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 44 deletions.
5 changes: 2 additions & 3 deletions .htmltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
2 changes: 1 addition & 1 deletion content/en/docs/get-started/contributor.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
37 changes: 37 additions & 0 deletions content/en/spec.md
Original file line number Diff line number Diff line change
@@ -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 %}}
31 changes: 0 additions & 31 deletions content/en/specifications/specs.md

This file was deleted.

2 changes: 1 addition & 1 deletion hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 4 additions & 8 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "/*"
Expand Down

0 comments on commit 4e89ea5

Please sign in to comment.