hexo-theme-miracle
Version:
A clean and lightweight single-column theme for Hexo.
23 lines (19 loc) • 457 B
JavaScript
/* global hexo */
;
const note = (args, content) => {
if (!args || !args[0]) {
args = ['No Title'];
}
return `
<details class="post-details">
<summary>${args.join(' ')}</summary>
<div class="details-content">
${hexo.render.renderSync({ text: content, engine: 'markdown' }).split('\n').join('')}
</div></details>`;
};
/*
{% card title %}
text
{% endcard %}
*/
hexo.extend.tag.register('card', note, { ends: true });