diff --git a/assets/js/page.js b/assets/js/page.js index 15936253..e3cb9794 100644 --- a/assets/js/page.js +++ b/assets/js/page.js @@ -1,7 +1,9 @@ var liked_page = false +var id = oid ? oid.replaceAll("/", "-") : oid +var id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes if (typeof auth !== 'undefined') { - var id = oid ? oid.replaceAll("/", "-") : oid + var viewed = localStorage.getItem(id); if (!viewed) { @@ -28,7 +30,6 @@ if (typeof auth !== 'undefined') { }); } - var id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes var liked = localStorage.getItem(id_likes); if (liked) { @@ -97,7 +98,6 @@ function remove_like_article(id_likes) { } function process_article() { - var id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes if (!liked_page) { like_article(id_likes) } else { diff --git a/exampleSite/content/docs/_index.zh-cn.md b/exampleSite/content/docs/_index.zh-cn.md index e69de29b..26cdfff9 100644 --- a/exampleSite/content/docs/_index.zh-cn.md +++ b/exampleSite/content/docs/_index.zh-cn.md @@ -0,0 +1,17 @@ +--- +title: "Documentation" +description: "Learn how to use Blowfish and its features." + +cascade: + showDate: false + showAuthor: false + invertPagination: true +--- + +{{< lead >}} +Simple, yet powerful. Learn how to use Blowfish and its features. +{{< /lead >}} + +This section contains everything you need to know about Blowfish. If you're new, check out the [Installation]({{< ref "docs/installation" >}}) guide to begin or visit the [Samples]({{< ref "samples" >}}) section to see what Blowfish can do. + +--- diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 62843f88..63b818b1 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -19,12 +19,16 @@
{{ partial "article-meta/list.html" (dict "context" . "scope" "single") }}
- {{ with .File }} + + {{ $path := .File.Path }} + {{range .AllTranslations}} + {{ $lang := print "." .Lang ".md" }} + {{ $path = replace $path $lang ".md" }} + {{end}} - {{ end }} {{ $jsPage := resources.Get "js/page.js" }} {{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 026954c7..f904f6d7 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -86,12 +86,15 @@ {{ partial "related.html" . }} - {{ with .File }} - - {{ end }} {{ $jsPage := resources.Get "js/page.js" }} {{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }} diff --git a/layouts/partials/meta/likes.html b/layouts/partials/meta/likes.html index 07e6293b..fecda06d 100644 --- a/layouts/partials/meta/likes.html +++ b/layouts/partials/meta/likes.html @@ -4,7 +4,12 @@ {{ else if eq .Kind "term"}} loading {{ partial "icon.html" "heart" }} diff --git a/layouts/partials/meta/views.html b/layouts/partials/meta/views.html index e60ba386..48a8dda8 100644 --- a/layouts/partials/meta/views.html +++ b/layouts/partials/meta/views.html @@ -4,7 +4,12 @@ {{ else if eq .Kind "term"}} loading {{ partial "icon.html" "eye" }}