diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-01-11 21:57:37 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-01-11 21:57:37 +0100 |
commit | fbb3c181cb079ee422dd8ad13438464af8a90469 (patch) | |
tree | 506d4c0fe154a4fc4534d71d1cc31573b56936ee | |
parent | 9af4ca386105281f3738800d5c97f76eb124f5da (diff) |
docs: Add dependency table to maintainance page
See #8949
-rw-r--r-- | docs/content/en/functions/hugo.md | 3 | ||||
-rw-r--r-- | docs/layouts/maintenance/list.html | 34 |
2 files changed, 35 insertions, 2 deletions
diff --git a/docs/content/en/functions/hugo.md b/docs/content/en/functions/hugo.md index fb20d2717..7602a2e34 100644 --- a/docs/content/en/functions/hugo.md +++ b/docs/content/en/functions/hugo.md @@ -88,6 +88,7 @@ An example table listing the dependencies: <thead> <tr> <th scope="col">#</th> + <th scope="col">Owner</th> <th scope="col">Path</th> <th scope="col">Version</th> <th scope="col">Time</th> @@ -98,7 +99,7 @@ An example table listing the dependencies: {{ range $index, $element := hugo.Deps }} <tr> <th scope="row">{{ add $index 1 }}</th> - <td>{{ with $element.Owner }}{{.Path }}{{ else }}PROJECT{{ end }}</td> + <td>{{ with $element.Owner }}{{.Path }}{{ end }}</td> <td> {{ $element.Path }} {{ with $element.Replace}} diff --git a/docs/layouts/maintenance/list.html b/docs/layouts/maintenance/list.html index 50059ad9e..ff573d54b 100644 --- a/docs/layouts/maintenance/list.html +++ b/docs/layouts/maintenance/list.html @@ -7,7 +7,8 @@ <ul> <li><a href="#last-updated">Last Updated</a></li> <li><a href="#least-recently-updated">Least Recently Updated</a></li> - <li><a href="#todos">Pages marked with TODO</a></li> + <li><a href="#todos">Pages marked with TODO</a></li> + <li><a href="#dependencies">Project dependencies (Hugo Modules)</a></li> </ul> </aside> </div> @@ -30,6 +31,37 @@ <h2 id="todos">Pages marked with TODO</h2> {{ partial "maintenance-pages-table" (.Scratch.Get "todos") }} + <h2 id="dependencies">Dependencies</h2> + <table class="collapse ba br2 b--black-10 pv2 ph3"> + <thead> + <tr> + <th class="pv2 ph3 tl f6 fw6 ttu">#</th> + <th class="pv2 ph3 tl f6 fw6 ttu">Owner</th> + <th class="pv2 ph3 tl f6 fw6 ttu">Path</th> + <th class="pv2 ph3 tl f6 fw6 ttu">Version</th> + <th class="pv2 ph3 tl f6 fw6 ttu">Time</th> + <th class="pv2 ph3 tl f6 fw6 ttu">Vendor</th> + </tr> + </thead> + <tbody> + {{ range $index, $element := hugo.Deps }} + <tr class="striped--light-gray"> + <th class="pv2 ph3">{{ add $index 1 }}</th> + <td class="pv2 ph3">{{ with $element.Owner }}{{.Path }}{{ end }}</td> + <td class="pv2 ph3"> + {{ $element.Path }} + {{ with $element.Replace}} + => {{ .Path }} + {{ end }} + </td> + <td class="pv2 ph3">{{ $element.Version }}</td> + <td class="pv2 ph3">{{ with $element.Time }}{{ . }}{{ end }}</td> + <td class="pv2 ph3">{{ $element.Vendor }}</td> + </tr> + {{ end }} + </tbody> + </table> + </div> </div> </div> |