diff --git a/assets/data/emoji/apple.yml b/assets/lib/valine/emoji/apple.yml similarity index 100% rename from assets/data/emoji/apple.yml rename to assets/lib/valine/emoji/apple.yml diff --git a/assets/data/emoji/facebook.yml b/assets/lib/valine/emoji/facebook.yml similarity index 100% rename from assets/data/emoji/facebook.yml rename to assets/lib/valine/emoji/facebook.yml diff --git a/assets/data/emoji/google.yml b/assets/lib/valine/emoji/google.yml similarity index 100% rename from assets/data/emoji/google.yml rename to assets/lib/valine/emoji/google.yml diff --git a/assets/data/emoji/twitter.yml b/assets/lib/valine/emoji/twitter.yml similarity index 100% rename from assets/data/emoji/twitter.yml rename to assets/lib/valine/emoji/twitter.yml diff --git a/config.toml b/config.toml index d70ee829..a3b5b273 100644 --- a/config.toml +++ b/config.toml @@ -423,14 +423,14 @@ serverURLs = "" # emoji data file name, default is "google.yml" # ["apple.yml", "google.yml", "facebook.yml", "twitter.yml"] - # located in "themes/LoveIt/assets/data/emoji/" directory + # located in "themes/LoveIt/assets/lib/valine/emoji/" directory # you can store your own data files in the same path under your project: - # "assets/data/emoji/" + # "assets/lib/valine/emoji/" # emoji 数据文件名称, 默认是 "google.yml" # ["apple.yml", "google.yml", "facebook.yml", "twitter.yml"] - # 位于 "themes/LoveIt/assets/data/emoji/" 目录 + # 位于 "themes/LoveIt/assets/lib/valine/emoji/" 目录 # 可以在你的项目下相同路径存放你自己的数据文件: - # "assets/data/emoji/" + # "assets/lib/valine/emoji/" emoji = "" # Facebook comment config (https://developers.facebook.com/docs/plugins/comments) # Facebook 评论系统设置 (https://developers.facebook.com/docs/plugins/comments) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index b7eeb4c6..86a65ede 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -505,14 +505,14 @@ enableEmoji = true serverURLs = "https://leancloud.hugoloveit.com" # emoji data file name, default is "google.yml" # ["apple.yml", "google.yml", "facebook.yml", "twitter.yml"] - # located in "themes/LoveIt/assets/data/emoji/" directory + # located in "themes/LoveIt/assets/lib/valine/emoji/" directory # you can store your own data files in the same path under your project: - # "assets/data/emoji/" + # "assets/lib/valine/emoji/" # emoji 数据文件名称, 默认是 "google.yml" # ["apple.yml", "google.yml", "facebook.yml", "twitter.yml"] - # 位于 "themes/LoveIt/assets/data/emoji/" 目录 + # 位于 "themes/LoveIt/assets/lib/valine/emoji/" 目录 # 可以在你的项目下相同路径存放你自己的数据文件: - # "assets/data/emoji/" + # "assets/lib/valine/emoji/" emoji = "" # Facebook comment config (https://developers.facebook.com/docs/plugins/comments) # Facebook 评论系统设置 (https://developers.facebook.com/docs/plugins/comments) diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md index 30a3a993..6ee1910d 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.en.md @@ -529,9 +529,9 @@ Please open the code block below to view the complete sample configuration :(far serverURLs = "" # {{< version 0.2.6 >}} emoji data file name, default is "google.yml" # ["apple.yml", "google.yml", "facebook.yml", "twitter.yml"] - # located in "themes/LoveIt/assets/data/emoji/" directory + # located in "themes/LoveIt/assets/lib/valine/emoji/" directory # you can store your own data files in the same path under your project: - # "assets/data/emoji/" + # "assets/lib/valine/emoji/" emoji = "" # {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook comment" >}} config [params.page.comment.facebook] diff --git a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md index 88f8134c..f33215dd 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md @@ -531,9 +531,9 @@ hugo serverURLs = "" # {{< version 0.2.6 >}} emoji 数据文件名称, 默认是 "google.yml" # ["apple.yml", "google.yml", "facebook.yml", "twitter.yml"] - # 位于 "themes/LoveIt/assets/data/emoji/" 目录 + # 位于 "themes/LoveIt/assets/lib/valine/emoji/" 目录 # 可以在你的项目下相同路径存放你自己的数据文件: - # "assets/data/emoji/" + # "assets/lib/valine/emoji/" emoji = "" # {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook 评论系统" >}}设置 [params.page.comment.facebook] diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html index 922c74d6..0358ca2d 100644 --- a/layouts/partials/comment.html +++ b/layouts/partials/comment.html @@ -51,7 +51,7 @@ {{- with $valine.serverURLs -}} {{- $commentConfig = dict "serverURLs" . | dict "valine" | merge $commentConfig -}} {{- end -}} - {{- $commentConfig = $valine.emoji | default "google.yml" | printf "data/emoji/%v" | resources.Get | transform.Unmarshal | dict "valine" | merge $commentConfig -}} + {{- $commentConfig = $valine.emoji | default "google.yml" | printf "lib/valine/emoji/%v" | resources.Get | transform.Unmarshal | dict "valine" | merge $commentConfig -}}