Skip to content

Commit

Permalink
docs: Add dependency table to maintainance page
Browse files Browse the repository at this point in the history
See #8949
  • Loading branch information
bep committed Jan 11, 2022
1 parent 9af4ca3 commit fbb3c18
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/content/en/functions/hugo.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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}}
Expand Down
34 changes: 33 additions & 1 deletion docs/layouts/maintenance/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -30,6 +31,37 @@ <h2 id="least-recently-updated">Least Recently Updated</h2>
<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>
Expand Down

0 comments on commit fbb3c18

Please sign in to comment.