Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ theme = "pixyll"
twitter_username = "username"
disqus_shortname = "sitename"
paginate = true

[[menu.main]]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add this menu to exampleSite configuration as well to show the support for menu items

url = "/about"
name = "About"
weight = 0
```

## Search
Expand Down
13 changes: 7 additions & 6 deletions i18n/en.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
[about]
other = "About"

[contact]
other = "Contact"

[tags]
other = "Tags"

Expand All @@ -18,3 +12,10 @@ other = "Newer"

[older]
other = "Older"

[by]
other = "by"

[post_date_format]
other = "Jan 2, 2006"

12 changes: 6 additions & 6 deletions i18n/ru.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
[about]
other = "О нас"

[contact]
other = "Контакты"

[tags]
other = "Теги"

Expand All @@ -18,3 +12,9 @@ other = "Следующая"

[older]
other = "Предыдущая"

[by]
other = "автор: "

[post_date_format]
other = "02.01.2006"
9 changes: 7 additions & 2 deletions layouts/partials/navigation.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<a href="{{ .Site.BaseURL }}{{ .Site.LanguagePrefix }}/about/">{{ i18n "about" }}</a>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<a class="nav-item{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{.URL}}">{{ .Name }}</a>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add i18n support for naming of menu items

{{ end }}

{{ if .Site.Taxonomies.tags }}
<a href="{{ .Site.BaseURL }}{{ .Site.LanguagePrefix }}/tags/">{{ i18n "tags" }}</a>
<a href="{{ .Site.BaseURL }}{{ .Site.LanguagePrefix }}/contact/">{{ i18n "contact" }}</a>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why that was removed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess, About and Contacts may be set through the main menu.

{{ end }}
{{- if .Site.IsMultiLingual -}}
{{- range $lang := .Site.Languages -}}
{{- if ne $.Site.Language $lang -}}
Expand Down
16 changes: 9 additions & 7 deletions layouts/post/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,22 @@
<div class="measure">
<div class="post-header mb2">
<h1 class="py2">{{ .Title }}</h1>
<span class="post-meta">{{ .Date.Format "Jan 2, 2006" }} by {{ .Params.author }}</span><br>
<span class="post-meta">{{ .Date.Format (i18n "post_date_format") }}{{ with .Params.author }} {{ i18n "by" }} {{ . }}{{end}}</span><br>
{{ $baseurl := .Site.BaseURL }}
</div>

<article class="post-content">
{{ .Content }}
</article>

<p class="post-meta">{{ i18n "tags" }}:&nbsp;
{{ range $i, $e := .Params.tags }}
{{if $i}},&nbsp;{{end}}
<a href="{{ $baseurl }}{{ $.Site.LanguagePrefix }}/tags/{{ . }}">{{ . }}</a>
{{ end }}
</p>
{{ with .Params.tags }}
<p class="post-meta">{{ i18n "tags" }}:&nbsp;
{{ range $i, $e := . }}
{{if $i}},&nbsp;{{end}}
<a href="{{ $baseurl }}{{ $.Site.LanguagePrefix }}/tags/{{ . }}">{{ . }}</a>
{{ end }}
</p>
{{ end }}

{{ partial "comments.html" . }}
</div>
Expand Down
16 changes: 9 additions & 7 deletions layouts/post/summary.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<div class="post">
<a class="post-link" href="{{ .Permalink }}">
<p class="post-meta left">{{ .Date.Format "Jan 2, 2006" }}</p>
<p class="post-author right">{{ i18n "written" }} {{ .Params.author }}</p>
<p class="post-meta left">{{ .Date.Format (i18n "post_date_format") }}</p>
<p class="post-author right">{{ with .Params.author }}{{ i18n "written" }} {{ . }}{{end}}</p>
<div class="clearfix"></div>
<h3 class="h2 post-title">{{ .Title }} {{ if .Draft }}(draft){{end}}</h3>
<p class="post-summary">{{ .Summary }}</p>
</a>
{{ $baseurl := .Site.BaseURL }}
<p class="post-meta">{{ i18n "tags" }}:&nbsp;
{{ range $i, $e := .Params.tags }}
{{if $i}},&nbsp;{{end}}
<a href="{{ $baseurl }}{{ $.Site.LanguagePrefix }}/tags/{{ . }}">{{ . }}</a>
{{ end }}</p>
{{ with .Params.tags }}
<p class="post-meta">{{ i18n "tags" }}:&nbsp;
{{ range $i, $e := . }}
{{if $i}},&nbsp;{{end}}
<a href="{{ $baseurl }}{{ $.Site.LanguagePrefix }}/tags/{{ . }}">{{ . }}</a>
{{ end }}</p>
{{ end }}
</div>