소스 검색

Fix TOC header (#168)

In English, the translation that is supposed to be shown on top of the table of contents looks like this:

```toml
[whatsInThis]
other = "What's in this {{.Type }}"
```

When it is invoked, there are two mistakes: `{{ i18n "whatsInThis" humanize .Type }}`.

The first mistake is that you cannot call `humanize` in this context. The more severe one is that if you remove `humanize` it will pass the `.Type` directly to the i18n and that tries to extract `.Type` from it.
tags/2.42
Konrad Kleine 5 년 전
부모
커밋
e956994e13
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      layouts/partials/menu-contextual.html

+ 1
- 1
layouts/partials/menu-contextual.html 파일 보기

@@ -5,7 +5,7 @@

{{- if .Params.toc -}}
<div class="bg-light-gray pa3 nested-list-reset nested-copy-line-height nested-links">
<p class="f5 b mb3">{{ i18n "whatsInThis" humanize .Type }}</p>
<p class="f5 b mb3">{{ i18n "whatsInThis" . }}</p>
{{ .TableOfContents }}
</div>
{{- end -}}

Loading…
취소
저장