Skip to content

Commit

Permalink
doc: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
BRAVO68WEB committed Nov 29, 2023
1 parent 6a80fa3 commit c812eeb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
## hexo-multiauthor-plugin Plugin
## hexo-multiauthor-plugin Plugin 👥

![Static Badge](https://img.shields.io/badge/hexo-v7.0.0-blue?style=flat-square&logo=hexo&labelColor=white)
![npm](https://img.shields.io/npm/v/hexo-multiauthor-plugin?style=for-the-badge&logo=npm)
![npm bundle size](https://img.shields.io/bundlephobia/min/hexo-multiauthor-plugin?style=for-the-badge&logo=npm)
![NPM](https://img.shields.io/npm/l/hexo-multiauthor-plugin?style=for-the-badge&logo=github)


This plugin allows you to add multiple authors to your Hexo blog. It is based on the [hexo-multiauthor](https://github.com/bob983/hexo-multiauthor)

Expand Down Expand Up @@ -45,7 +51,20 @@ Add this code snippet to your theme wherever you want to display the author's na
For example, if you are using the default Hexo theme, you can add this code snippet to `themes/landscape/layout/_partial/article.ejs` just below `<%- post.content %>`:

```ejs
<%- post_author() %>
<div class="author-banner">
<% if (post_author()){ %>
<% if (post.author.length > 1){ %>
<div class="author-header"><h2>Co Authors</h2></div>
<% } else if (post.author.length == 1){ %>
<div class="author-header"><h2>Author</h2></div>
<% } %>
<% post.author.forEach(function(au) { %>
<div class="author-name">
<%=au.name %>, <%=au.about %>
</div>
<% }); %>
<% } %>
</div>
```

## Options
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-multiauthor-plugin",
"version": "1.1.0",
"version": "1.1.1",
"description": "Hexo plugin to support multiple authors",
"main": "index.js",
"repository": {
Expand All @@ -24,7 +24,6 @@
},
"license": "MIT",
"dependencies": {
"hexo": "^7.0.0",
"js-yaml": "^4.1.0"
},
"devDependencies": {
Expand Down

0 comments on commit c812eeb

Please sign in to comment.