hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit fbb3c181cb079ee422dd8ad13438464af8a90469
parent 9af4ca386105281f3738800d5c97f76eb124f5da
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Tue, 11 Jan 2022 21:57:37 +0100

docs: Add dependency table to maintainance page

See #8949

Diffstat:
Mdocs/content/en/functions/hugo.md | 3++-
Mdocs/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
@@ -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
@@ -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>