From a9bd823da39b59c10c91395ae452351754223e5d Mon Sep 17 00:00:00 2001 From: KALE1D0 Date: Sun, 3 Feb 2019 14:54:13 +0800 Subject: [PATCH] fix mathjax in archive page --- layout/archive.ejs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/layout/archive.ejs b/layout/archive.ejs index da2e4c4..4cfcfc0 100755 --- a/layout/archive.ejs +++ b/layout/archive.ejs @@ -33,3 +33,19 @@ <% } %> + + +<% +var need_mathjax = false; +page.posts.each(function(post){ + if (post.mathjax){ + if (post.mathjax != "internal") { + need_mathjax = true; + } + } +}); +%> + +<% if (need_mathjax){ %> + <%- partial('_partial/mathjax') %> +<% } %>