Skip to content

Commit b2ea3ee

Browse files
authored
Merge pull request #280 from yangchuansheng/dev-1
🐛 fix zh blogs
2 parents f54b293 + d0b1854 commit b2ea3ee

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

layouts/partials/navbar.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@
2121
{{ $post := .Post }}
2222
{{ $url := urls.Parse .URL }}
2323
{{ $baseurl := urls.Parse $.Site.Params.Baseurl }}
24+
{{ if eq .URL "/zh-cn/docs/" }}
2425
<a class="nav-link{{if $active }} active{{end}} hide_zh_doc_class" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}" {{ if ne $url.Host $baseurl.Host }}target="_blank" {{ end }}>{{ with .Pre}}{{ $pre }}{{ end }}<span{{if $active }} class="active"{{end}}>{{ .Name }}</span>{{ with .Post}}{{ $post }}{{ end }}</a>
26+
{{ else }}
27+
<a class="nav-link{{if $active }} active{{end}}" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}" {{ if ne $url.Host $baseurl.Host }}target="_blank" {{ end }}>{{ with .Pre}}{{ $pre }}{{ end }}<span{{if $active }} class="active"{{end}}>{{ .Name }}</span>{{ with .Post}}{{ $post }}{{ end }}</a>
28+
{{ end }}
2529
</li>
2630
{{ end }}
2731
{{ if (gt (len .Site.Home.Translations) 0) }}
@@ -32,4 +36,4 @@
3236
</ul>
3337
</div>
3438
<div class="navbar-nav d-none d-lg-block">{{ partial "search-input.html" . }}</div>
35-
</nav>
39+
</nav>

0 commit comments

Comments
 (0)