Site improvements

- The release note index page is now rendered as a simple list rather than the normal gallery mode.

- Fix use of toc: front-matter, which should be skip_toc instead.
This commit is contained in:
mtail 2018-10-31 07:15:57 -07:00
parent 530e0d6ebe
commit 1b9e81f771
5 changed files with 25 additions and 12 deletions

View File

@ -104,6 +104,7 @@ The available front matter fields are:
|`skip_toc` | Set this to true to prevent the page from having a table of contents generated for it
|`skip_seealso` | Set this to true to prevent the page from having a "See also" section generated for it
|`force_inline_toc` | Set this to true to force the generated table of contents to be inserted inline in the text instead of in a sidebar
|`simple_list` | Set this to true to force a generated section page to use a simple list layout rather that a gallery layout
There are a few more front matter fields available specifically for blog posts:
@ -112,7 +113,7 @@ There are a few more front matter fields available specifically for blog posts:
|`publishdate` | Date of the post's original publication
|`last_update` | Date when the post last received a major revision
|`attribution` | Optional name of the post's author
|`twitter` | Optional Twitter of the post's author
|`twitter` | Optional Twitter handle of the post's author
## Adding images

View File

@ -8,6 +8,7 @@ aliases:
- /docs/welcome/notes/index.html
- /docs/references/notes
icon: notes
simple_list: true
---
Check out our [release page](https://github.com/istio/istio/releases) to download Istio binaries.

View File

@ -2,5 +2,5 @@
title: Search Results
url: /search.html
sidebar_none: true
toc: false
skip_toc: true
---

View File

@ -2,5 +2,5 @@
title: 搜索结果
url: /zh/search.html
sidebar_none: true
toc: false
skip_toc: true
---

View File

@ -11,15 +11,26 @@
{{ $pages := (where .Site.Pages "Section" .Section).ByWeight }}
{{ $parent := .Page }}
{{ range $pages }}
{{ if eq .Parent $parent }}
<div class="col-xs-12 col-sm-6 col-xl-4 entry">
<h5>
<a href="{{ .Permalink }}">{{- if .Params.icon -}}<i class="page_icon">
{{- partial "icon.html" .Params.icon -}}</i>{{- end -}}{{- .Title -}}</a>
</h5>
<p>{{ .Description }}</p>
</div>
{{ if $parent.Params.simple_list }}
<ul>
{{ range $pages }}
{{ if eq .Parent $parent }}
<li><a href="{{ .Permalink }}">{{- .Title -}}</a></li>
{{ end }}
{{ end }}
</ul>
{{ else }}
{{ range $pages }}
{{ if eq .Parent $parent }}
<div class="col-xs-12 col-sm-6 col-xl-4 entry">
<h5>
<a href="{{ .Permalink }}">{{- if .Params.icon -}}<i class="page_icon">
{{- partial "icon.html" .Params.icon -}}</i>{{- end -}}{{- .Title -}}</a>
</h5>
<p>{{ .Description }}</p>
</div>
{{ end }}
{{ end }}
{{ end }}
</div>