Skip to content

Commit

Permalink
mod: returns author array insted of embed code
Browse files Browse the repository at this point in the history
  • Loading branch information
BRAVO68WEB committed Nov 29, 2023
1 parent 23d2577 commit 6a80fa3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ For example, if you are using the default Hexo theme, you can add this code snip

- Coming soon

## Tested On

- Hexo 7.0

## License

MIT
This project is licenced with [MIT](LICENCE)
15 changes: 1 addition & 14 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,5 @@ hexo.extend.helper.register("post_author", function () {
}
}

let authorTitle = "Author:";

if (post.author.length > 1) {
authorTitle = "Authors:";
}

return `
<h2>${authorTitle}</h2>
<ul>
${post.author
.map((author) => `<li>${author.name} - ${author.about} </li>`)
.join("\n")}
</ul>
`;
return post.author
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-multiauthor-plugin",
"version": "1.0.1",
"version": "1.1.0",
"description": "Hexo plugin to support multiple authors",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 6a80fa3

Please sign in to comment.