Kaynağa Gözat

fix: comment counter link & html language attribute

ppoffice 9 yıl önce
ebeveyn
işleme
ba47cdc7bf
2 değiştirilmiş dosya ile 4 ekleme ve 4 silme
  1. 3 3
      layout/comment/counter.ejs
  2. 1 1
      layout/common/head.ejs

+ 3 - 3
layout/comment/counter.ejs

@@ -1,9 +1,9 @@
 <% if (post.comments) { %>
     <% if (theme.comment.disqus) { %>
-        <a href="<%- post.permalink %>#comments" class="article-comment-link disqus-comment-count" data-disqus-url="<%= post.permalink %>"><%= __('article.comments') %></a>
+        <a href="<%- url_for(post.permalink) %>#comments" class="article-comment-link disqus-comment-count" data-disqus-url="<%= url_for(post.permalink) %>"><%= __('article.comments') %></a>
     <% } else if (theme.comment.duoshuo) { %>
-        <a href="<%- post.permalink %>#comments" class="article-comment-link ds-thread-count" data-thread-key="<%= post.path %>"><%= __('article.comments') %></a>
+        <a href="<%- url_for(post.permalink) %>#comments" class="article-comment-link ds-thread-count" data-thread-key="<%= post.path %>"><%= __('article.comments') %></a>
     <% } else if (theme.comment.youyan) { %>
-        <a href="<%- post.permalink %>#comments" class="article-comment-link"><%= __('article.comments') %></a>
+        <a href="<%- url_for(post.permalink) %>#comments" class="article-comment-link"><%= __('article.comments') %></a>
     <% } %>
 <% } %>

+ 1 - 1
layout/common/head.ejs

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html lang="<%=config.language.substring(0, 2) %>">
+<html<%= config.language ? " lang=" + config.language.substring(0, 2) : ""%>>
 <head>
     <meta charset="utf-8">
     <%