From 2d80c45ec5f3f557e29ff72c43628f6339bcb64f Mon Sep 17 00:00:00 2001 From: XPoet Date: Fri, 23 Sep 2022 14:23:26 +0800 Subject: [PATCH] style(gitalk): gitalk.ejs code optimization --- layout/_partial/comment/gitalk.ejs | 69 ++++++++++++++++-------------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/layout/_partial/comment/gitalk.ejs b/layout/_partial/comment/gitalk.ejs index 0d743ad..423928a 100644 --- a/layout/_partial/comment/gitalk.ejs +++ b/layout/_partial/comment/gitalk.ejs @@ -1,46 +1,49 @@ +<% const { client_id, client_secret, repository, github_id, github_admins } = theme.comment.gitalk %> + <% if( theme.comment.use === 'gitalk' - && theme.comment.gitalk.client_id - && theme.comment.gitalk.client_secret - && theme.comment.gitalk.github_id - && theme.comment.gitalk.repository + && client_id + && client_secret + && github_id + && repository ) { %>
<% } %>