From 494f7e1a6e82c50a8d61ec8919f496ccb15939a3 Mon Sep 17 00:00:00 2001 From: jiansing Date: Fri, 24 Apr 2020 22:42:26 +0800 Subject: [PATCH] v1.3.0-alpha.2 updated 2020.4.24 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 版本特性: 1. 支持文章页与首页 SEO Meta 2. 支持文章页与首页 JSON-LD 结构化数据 3. 支持 Gitalk 评论 4. 支持 Valine 评论 5. 支持 Utterances 评论 以上评论系统均以能够通过 AMP 验证的方式实现,由于不是官方给出的实现方案,可能存在一些常规情况下不会出现的问题,在后面的版本中随时可能被移除。 --- README.md | 10 ++++++++++ inlineamp/config.json | 14 +++++++++++++- inlineamp/templates/includes/head.ejs | 2 +- inlineamp/templates/includes/post-head.ejs | 5 ++++- inlineamp/templates/includes/valine.ejs | 15 +++++++++++++++ inlineamp/templates/post.ejs | 4 ++++ 6 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 inlineamp/templates/includes/valine.ejs diff --git a/README.md b/README.md index f43bb43..d7f1594 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,16 @@ https://jiansing.github.io/include-images-and-video/ 添加评论 https://jiansing.github.io/add-comment-for-gridea-theme-inlineamp/ +## v1.3.0-alpha.2 updated 2020.4.24 +版本特性: +1. 支持文章页与首页 SEO Meta +2. 支持文章页与首页 JSON-LD 结构化数据 +3. 支持 Gitalk 评论 +4. 支持 Valine 评论 +5. 支持 Utterances 评论 +以上评论系统均以能够通过 AMP 验证的方式实现,由于不是官方给出的实现方案,可能存在一些常规情况下不会出现的问题,在后面的版本中随时可能被移除。 + + ## v1.2.1 updated 2020.4.24 1. 修复了 Disqus 评论区重复显示的问题 diff --git a/inlineamp/config.json b/inlineamp/config.json index 3228a59..b5ade34 100644 --- a/inlineamp/config.json +++ b/inlineamp/config.json @@ -113,9 +113,13 @@ "value": "gitalk" }, { - "label": "utterances 评论(实验性)", + "label": "Utterances 评论(实验性)", "value": "utterances" }, + { + "label": "Valine 评论(实验性)", + "value": "valine" + }, { "label": "Disqus", "value": "disqus" @@ -142,6 +146,14 @@ "type": "input", "note": "该文件不能与 blog 使用同一域名(可以使用不同的子域名如 cdn.example.com)" }, + { + "name": "valineurl", + "label": "Valine 代码 URL", + "group": "评论", + "value": "", + "type": "input", + "note": "该文件不能与 blog 使用同一域名(可以使用不同的子域名如 cdn.example.com)" + }, { "name": "facebookcommentslanguage", "label": "Facebook 评论系统语言", diff --git a/inlineamp/templates/includes/head.ejs b/inlineamp/templates/includes/head.ejs index 50c002a..ced8774 100644 --- a/inlineamp/templates/includes/head.ejs +++ b/inlineamp/templates/includes/head.ejs @@ -248,7 +248,7 @@ footer{width:100vw;background:#222;display:flex;justify-content:center} -<%- include('./includes/seo') %> +<%- include('./seo') %> <% if (site.customConfig.search) { %><% } %> <% if (site.customConfig.video) { %><% } %> diff --git a/inlineamp/templates/includes/post-head.ejs b/inlineamp/templates/includes/post-head.ejs index ae1e55b..dac9d66 100644 --- a/inlineamp/templates/includes/post-head.ejs +++ b/inlineamp/templates/includes/post-head.ejs @@ -2496,7 +2496,7 @@ footer { -<%- include('./includes/postseo') %> +<%- include('./postseo') %> <% if (site.customConfig.search) { %><% } %> <% if (site.customConfig.video) { %><% } %> @@ -2516,6 +2516,9 @@ footer { <% if (site.customConfig.comments === 'disqus') { %> <% } %> + <% if (site.customConfig.comments === 'valine') { %> + + <% } %> <% if (site.customConfig.comments === 'gitalk') { %> <% } %> diff --git a/inlineamp/templates/includes/valine.ejs b/inlineamp/templates/includes/valine.ejs new file mode 100644 index 0000000..3fd6da9 --- /dev/null +++ b/inlineamp/templates/includes/valine.ejs @@ -0,0 +1,15 @@ +
+
+ +
Loading
+
+ +
+
\ No newline at end of file diff --git a/inlineamp/templates/post.ejs b/inlineamp/templates/post.ejs index c505c34..f2db546 100644 --- a/inlineamp/templates/post.ejs +++ b/inlineamp/templates/post.ejs @@ -103,6 +103,10 @@ <%- include('./includes/utterances') %> <% } %> + <% if (site.customConfig.comments === 'valine') { %> + <%- include('./includes/valine') %> + <% } %> + <% if (site.customConfig.comments === 'facebookcomments') { %> <%- include('./includes/facebookcomments') %> <% } %>