From 927c76ce18f41e34f88017dd32f9e9d409434f4d Mon Sep 17 00:00:00 2001 From: miodzie Date: Fri, 30 Sep 2022 18:10:49 -0400 Subject: [PATCH] Update .Path to .File.Path to fix deprecation warnings. --- layouts/_default/single.html | 8 ++++---- layouts/partials/meta/views.html | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 0236b27a..9694c9ae 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -27,7 +27,7 @@ var liked_article = false if (typeof auth !== 'undefined') { - var oid = "views_{{ .Path }}" + var oid = "views_{{ .File.Path }}" var id = oid ? oid.replaceAll("/", "-") : oid var viewed = localStorage.getItem(id); @@ -56,7 +56,7 @@ }); } - var oid_likes = "likes_{{ .Path }}" + var oid_likes = "likes_{{ .File.Path }}" var id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes var liked = localStorage.getItem(id_likes); @@ -123,7 +123,7 @@ } function process_article() { - var oid_likes = "likes_{{ .Path }}" + var oid_likes = "likes_{{ .File.Path }}" var id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes if (!liked_article) { like_article(id_likes) @@ -151,4 +151,4 @@ {{ end }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/partials/meta/views.html b/layouts/partials/meta/views.html index 269936b0..9743affc 100644 --- a/layouts/partials/meta/views.html +++ b/layouts/partials/meta/views.html @@ -1,4 +1,4 @@ - + {{- i18n "article.views" 0 | markdownify | emojify -}} {{- /* Trim EOF */ -}}