Skip to content

Commit 7da28d2

Browse files
authored
Merge pull request #47270 from Okabe-Junya/fix-47223
Improve blog article summaries presentation with translator metadata in front matter
2 parents 5e59fe6 + ac4a08a commit 7da28d2

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

data/i18n/en/en.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,8 @@ other = """<p>Items on this page refer to third party products or projects that
587587
[thirdparty_message_vendor]
588588
other = """Items on this page refer to vendors external to Kubernetes. The Kubernetes project authors aren't responsible for those third-party products or projects. To add a vendor, product or project to this list, read the <a href="/docs/contribute/style/content-guide/#third-party-content">content guide</a> before submitting a change. <a href="#third-party-content-disclaimer">More information.</a>"""
589589

590+
[translated_by]
591+
other = "Translated By"
590592

591593
[ui_search_placeholder]
592594
other = "Search this site"

layouts/blog/content.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<div class="td-content">
2+
<h1>{{ .Title }}</h1>
3+
{{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }}
4+
<div class="td-byline mb-4">
5+
{{ with .Params.author }}{{ T "post_byline_by" }} <b>{{ . | markdownify }}</b> |{{ end}}
6+
{{ with .Params.translator }}{{ T "translated_by" }} <b>{{ . | markdownify }}</b> |{{ end }}
7+
<time datetime="{{ $.Date.Format "2006-01-02" }}" class="text-muted">{{ $.Date.Format $.Site.Params.time_format_blog }}</time>
8+
</div>
9+
<header class="article-meta">
10+
{{ partial "taxonomy_terms_article_wrapper.html" . }}
11+
{{ if (and (not .Params.hide_readingtime) (.Site.Params.ui.readingtime.enable)) }}
12+
{{ partial "reading-time.html" . }}
13+
{{ end }}
14+
</header>
15+
{{ .Content }}
16+
{{ if (.Site.Params.DisqusShortname) }}
17+
<br />
18+
{{ partial "disqus-comment.html" . }}
19+
<br />
20+
{{ end }}
21+
22+
{{ partial "pager.html" . }}
23+
</div>

0 commit comments

Comments
 (0)