hexo-theme-stellar/layout/_plugins/tianli_gpt.ejs

11 lines
432 B
Plaintext
Raw Normal View History

2024-02-12 23:07:56 +08:00
<% if (['all', page.layout].includes(theme.plugins.tianli_gpt.field)) { %>
2024-02-18 12:31:36 +08:00
<script defer src="<%- theme.plugins.tianli_gpt?.js %>"></script>
<script defer>
window.addEventListener('DOMContentLoaded', (event) => {
new ChucklePostAI(Object.assign({
el: 'article.content',
2024-02-18 12:31:36 +08:00
css: `/css/_plugins/tianli_gpt`
}, JSON.parse(`<%- JSON.stringify(theme.plugins.tianli_gpt) %>`)))
});
</script>
<% } %>