Skip to content

Commit

Permalink
Merge pull request #37 from JoashZhao/master
Browse files Browse the repository at this point in the history
feat: add urlname from slug prop
  • Loading branch information
x-cold committed Sep 4, 2019
2 parents 78d518b + aabc7c9 commit 40ca101
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion adapter/hexo.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@ module.exports = function(post) {
// matter 解析
const parseRet = parseMatter(post.body);
const { body, ...data } = parseRet;
const { title, created_at } = post;
const { title, slug: urlname, created_at } = post;
const raw = formatRaw(body);
const date = data.date || formatDate(created_at);
const tags = data.tags || [];
const props = {
title,
urlname,
date,
...data,
tags: formatTags(tags),
Expand Down

0 comments on commit 40ca101

Please sign in to comment.