diff options
author | zhaohuabing <zhaohuabing@gmail.com> | 2022-02-09 11:17:45 +0300 |
---|---|---|
committer | zhaohuabing <zhaohuabing@gmail.com> | 2022-02-09 11:17:45 +0300 |
commit | 6a502b277bf95e1b3b00d303470c75a0aaec41ee (patch) | |
tree | 13a306eca833cebadd37c67e86aa9f3bb13e29b3 | |
parent | a431e5009ebd8114c6d12a37985f646470537e58 (diff) |
fix #126
Signed-off-by: zhaohuabing <zhaohuabing@gmail.com>
-rw-r--r-- | layouts/_default/list.algolia.json | 2 | ||||
-rw-r--r-- | layouts/_default/single.html | 4 | ||||
-rw-r--r-- | layouts/partials/head.html | 2 | ||||
-rw-r--r-- | layouts/partials/header.html | 4 | ||||
-rw-r--r-- | layouts/partials/page_view_counter.html | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/layouts/_default/list.algolia.json b/layouts/_default/list.algolia.json index 556e362..963ad07 100644 --- a/layouts/_default/list.algolia.json +++ b/layouts/_default/list.algolia.json @@ -3,7 +3,7 @@ {{- $section := $.Site.GetPage "section" .Section }} {{- range .Site.AllPages -}} {{- if or (and (.IsDescendant $section) (and (not .Draft) (not .Params.private))) $section.IsHome -}} - {{- $.Scratch.Add "index" (dict "objectID" .UniqueID "date" .Date.UTC.Unix "description" .Description "dir" .Dir "expirydate" .ExpiryDate.UTC.Unix "fuzzywordcount" .FuzzyWordCount "keywords" .Keywords "kind" .Kind "lang" .Lang "lastmod" .Lastmod.UTC.Unix "permalink" .Permalink "publishdate" .PublishDate "readingtime" .ReadingTime "relpermalink" .RelPermalink "html" .Params.Description "title" .Title "type" .Type "url" .URL "weight" .Weight "wordcount" .WordCount "section" .Section "tags" .Params.Tags "categories" .Params.Categories "author" .Params.authors "content" .Params.Description "excerpt_html" .Params.Description "excerpt_text" .Params.Description "summary" .Summary)}} + {{- $.Scratch.Add "index" (dict "objectID" .File.UniqueID "date" .Date.UTC.Unix "description" .Description "dir" .File.Dir "expirydate" .ExpiryDate.UTC.Unix "fuzzywordcount" .FuzzyWordCount "keywords" .Keywords "kind" .Kind "lang" .Lang "lastmod" .Lastmod.UTC.Unix "permalink" .Permalink "publishdate" .PublishDate "readingtime" .ReadingTime "relpermalink" .RelPermalink "html" .Params.Description "title" .Title "type" .Type "url" .RelPermalink "weight" .Weight "wordcount" .WordCount "section" .Section "tags" .Params.Tags "categories" .Params.Categories "author" .Params.authors "content" .Params.Description "excerpt_html" .Params.Description "excerpt_text" .Params.Description "summary" .Summary)}} {{- end -}} {{- end -}} {{- $.Scratch.Get "index" | jsonify -}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7474ea8..4c9bf3b 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -87,13 +87,13 @@ <ul class="pager"> {{ if .PrevInSection }} <li class="previous"> - <a href="{{ .PrevInSection.URL }}" data-toggle="tooltip" data-placement="top" title="{{ .PrevInSection.Title}}">← + <a href="{{ .PrevInSection.RelPermalink }}" data-toggle="tooltip" data-placement="top" title="{{ .PrevInSection.Title}}">← Previous Post</a> </li> {{ end }} {{ if .NextInSection }} <li class="next"> - <a href="{{ .NextInSection.URL }}" data-toggle="tooltip" data-placement="top" title="{{ .NextInSection.Title}}">Next + <a href="{{ .NextInSection.RelPermalink }}" data-toggle="tooltip" data-placement="top" title="{{ .NextInSection.Title}}">Next Post →</a> </li> {{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index c514346..2b6619f 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -47,7 +47,7 @@ <title>{{ if .Title }}{{ .Title }}-{{ .Site.Params.SEOTitle }}{{ else }}{{ .Site.Params.SEOTitle }}{{ end }}</title> - <link rel="canonical" href="{{ .URL | relURL }}"> + <link rel="canonical" href="{{ .RelPermalink }}"> <link rel="stylesheet" href="{{ "css/iDisqus.min.css" | relURL }}"/> diff --git a/layouts/partials/header.html b/layouts/partials/header.html index b3b1362..208024a 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -18,8 +18,8 @@ <ul id="menu-primary-items" class="menu-primary-items"> {{ $page := . }} {{ range .Site.Menus.main }} - <li id="menu-item" class='menu-item {{ if eq ("/") (.URL) }}menu-item-type-custom menu-item-object-custom{{ else }}menu-item-type-post_type menu-item-object-page{{ end }} {{ if $page.IsMenuCurrent "main" . }}current-menu-item current_page_item{{ end }}'> - <a href="{{ .URL | relURL }}">{{ .Name }}</a> + <li id="menu-item" class='menu-item {{ if eq ("/") (.RelPermalink) }}menu-item-type-custom menu-item-object-custom{{ else }}menu-item-type-post_type menu-item-object-page{{ end }} {{ if $page.IsMenuCurrent "main" . }}current-menu-item current_page_item{{ end }}'> + <a href="{{ .RelPermalink }}">{{ .Name }}</a> </li> {{ end }} </ul> diff --git a/layouts/partials/page_view_counter.html b/layouts/partials/page_view_counter.html index f4bb4ee..bc32ede 100644 --- a/layouts/partials/page_view_counter.html +++ b/layouts/partials/page_view_counter.html @@ -1,4 +1,4 @@ -<span id="{{ .URL }}" class="leancloud_visitors meta_data_item" data-flag-title=""> +<span id="{{ .RelPermalink }}" class="leancloud_visitors meta_data_item" data-flag-title=""> <span class="post-meta-item-icon"> <span class="octicon octicon-eye"></span> </span> |