Skip to content

Commit

Permalink
Add containerd's docs directory
Browse files Browse the repository at this point in the history
Signed-off-by: Kazuyoshi Kato <[email protected]>
  • Loading branch information
kzys committed Apr 6, 2022
1 parent 1858a1c commit 49efa8f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 15 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ serve:
--buildFuture \
--disableFastRender

production-build:
public/docs/latest:
rm -fr containerd # seems Netlify is caching this directory.
git clone --depth 1 https://github.com/containerd/containerd.git containerd
mv containerd/docs content/docs/latest

production-build: public/docs/latest
hugo \
--minify

preview-build:
preview-build: public/docs/latest
hugo \
--baseURL $(DEPLOY_PRIME_URL) \
--buildDrafts \
Expand Down
10 changes: 6 additions & 4 deletions themes/containerd/layouts/partials/docs/dropdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
<div class="dropdown-menu" id="docs-dropdown-menu" role="menu">
<div class="dropdown-content">
{{- range $docs }}
{{- $isCurrentPage := eq $currentUrl .RelPermalink }}
<a class="dropdown-item{{ if $isCurrentPage }} is-active{{ end }}" href="{{ .RelPermalink }}">
{{ .Title }}
</a>
{{- $isCurrentPage := eq $currentUrl .RelPermalink }}
{{ if .Title }}
<a class="dropdown-item{{ if $isCurrentPage }} is-active{{ end }}" href="{{ .RelPermalink }}">
{{ .Title }}
</a>
{{ end }}
{{- end }}
</div>
</div>
Expand Down
14 changes: 8 additions & 6 deletions themes/containerd/layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@

<ul>
{{- range $docs }}
<li>
<a href="{{ .RelPermalink }}">
{{ .Title }}
</a>
</li>
{{ if .Title }}
<li>
<a href="{{ .RelPermalink }}">
{{ .Title }}
</a>
</li>
{{ end }}
{{- end }}
</ul>
</ul>
</div>

<div class="column">
Expand Down
8 changes: 5 additions & 3 deletions themes/containerd/layouts/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@

<div class="navbar-dropdown is-right">
{{- range $docs }}
<a class="navbar-item" href="{{ .RelPermalink }}">
{{ .Title }}
</a>
{{ if .Title }}
<a class="navbar-item" href="{{ .RelPermalink }}">
{{ .Title }}
</a>
{{ end }}
{{- end }}
</div>
</div> <!-- .navbar-item -->
Expand Down

0 comments on commit 49efa8f

Please sign in to comment.