作者
getContributor(name)
contributorFinder.getContributor(name)
描述
根据 metadata.name 获取作者。
参数
- name:string- 作者的唯一标识- metadata.name。
返回值
示例
<div th:with="contributor = ${contributorFinder.getContributor('contributor-foo')}">
  <h1 th:text="${contributor.displayName}"></h1>
</div>
getContributors(names)
contributorFinder.getContributors(names)
描述
根据一组 metadata.name 获取作者。
参数
- names:List<string>- 作者的唯一标识- metadata.name的集合。
返回值
List<#ContributorVo>
示例
<div th:with="contributors = ${contributorFinder.getContributors(['contributor-foo, 'contributor-bar'])}">
  <span th:each="contributor : ${contributors}" th:text="${contributor.displayName}"></span>
</div>
类型定义
ContributorVo
ContributorVo
{
  "name": "string",                                   // 用户名
  "displayName": "string",                            // 显示名称
  "avatar": "string",                                 // 头像
  "bio": "string",                                    // 描述
  "permalink": "string"                               // 作者的文章归档页面链接
}