hexo-talk
Version:
Creating a talk component or page in hexo post.
26 lines (23 loc) • 594 B
JavaScript
module.exports = async function (locals) {
const type = this.config.talk.type;
const title = this.config.talk.title;
let content;
switch (type) {
case "flomo":
content = await require("./driver/Flomo").call(this, locals);
break;
default:
throw new Error(`Unknown talk type: ${type}`);
}
return {
path: "talk/index.html",
data: {
slug: "talk",
title,
content,
link: "/talk",
},
layout: ["page", "post"],
link: "/talk",
};
};