Support comment js address options.

pull/296/head
ruibaby 2019-08-25 15:53:54 +08:00
parent a160bad825
commit f99bf401a5
2 changed files with 4 additions and 2 deletions

View File

@ -23,7 +23,9 @@ public enum CommentProperties implements PropertyEnum {
PAGE_SIZE("comment_page_size", Integer.class, "10"),
CONTENT_PLACEHOLDER("comment_content_placeholder", String.class, "");
CONTENT_PLACEHOLDER("comment_content_placeholder", String.class, ""),
INTERNAL_PLUGIN_JS("comment_internal_plugin_js", String.class, "//cdn.jsdelivr.net/gh/halo-dev/halo-comment@latest/dist/halo-comment.min.js");
private final String value;

View File

@ -61,7 +61,7 @@
<#macro comment post,type>
<#if !post.disallowComment!false>
<script src="//cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.min.js"></script>
<script src="//cdn.jsdelivr.net/gh/halo-dev/halo-comment@1.0.5/dist/halo-comment.min.js"></script>
<script src="${options.comment_internal_plugin_js!'//cdn.jsdelivr.net/gh/halo-dev/halo-comment@latest/dist/halo-comment.min.js'}"></script>
<halo-comment id="${post.id}" type="${type}"/>
</#if>
</#macro>