hexo-multiauthor
Adds features for multiauthor blogging
Last updated 6 years ago by bob983 .
Original npm · Tarball · package.json
$ cnpm install hexo-multiauthor 
SYNC missed versions from official npm registry.

Multi author support for Hexo

Build Status Coverage Status Code Climate

Description

This plugin adds support for multiple authors. You can add author to a post by adding authorId to frontmatter.

title: Sample post
date: 2014/01/10 12:00
tags: [hexo]
authorId: LSK

At this point, this plugin expects a file source/_authors/LSK.yml exists. Following content is supported:

name: Luke Skywalker
about: Pilot

When the public content is generated, plugin will group posts by authors and generate pages for each author. In order to reach the author page, you need to tweak the templates.

layout/partial/post/title.ejs:

<% if (item.link){ %>
  <% if (item.title){ %>
    <h1 class="title"><a href="<%- item.link %>" target="_blank"><%= item.title %></a></h1>
  <% } else { %>
    <h1 class="title"><a href="<%- item.link %>" target="_blank"><%= item.link %></a></h1>
  <% } %>
<% } else { %>
  <% if (index){ %>
    <h1 class="title"><a href="<%- config.root %><%- item.path %>"><%= item.title %></a></h1>
  <% } else { %>
    <h1 class="title"><%= item.title %></h1>
  <% } %>
   <% if (author && item.author) { %>
    <a href="<%- config.root %><%- 'author/' + item.authorId %>"><h4><%= item.author.name %></h4></a>
   <% } %>
<% } %> 

Current Tags

  • 0.0.1                                ...           latest (6 years ago)

1 Versions

  • 0.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 4
Dependencies (6)
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |