android13/external/exoplayer/tree_8e57d3715f9092d5ec54eb.../docs/_includes/comments-providers/valine.html

33 lines
929 B
HTML
Raw Normal View History

2024-06-22 08:45:49 -04:00
{%- include snippets/get-sources.html -%}
{%- assign _sources = __return -%}
{%- assign _VALINE_APP_ID = site.comments.valine.app_id -%}
{%- assign _VALINE_APP_KEY = site.comments.valine.app_key -%}
{%- assign _VALINE_PLACEHOLDER = site.comments.valine.placeholder -%}
{%- if page.key and
_VALINE_APP_ID and
_VALINE_APP_KEY -%}
<div id="vcomments"></div>
<script>
window.Lazyload.js(['{{ _sources.leancloud_js_sdk}}', '{{ _sources.valine }}'], function() {
var _config = {
el: '#vcomments',
appId: '{{ _VALINE_APP_ID }}',
appKey: '{{ _VALINE_APP_KEY }}',
verify: true,
};
{%- if _VALINE_PLACEHOLDER -%}
_config.placeholder = '{{ _VALINE_PLACEHOLDER }}';
{%- endif -%}
{%- assign _page_lang_slice = page.lang | slice: 0, 2 -%}
{%- if _page_lang_slice != 'zh' -%}
_config.lang = 'en';
{%- endif -%}
new Valine(_config);
});
</script>
{%- endif -%}