Skip to content

Commit 40ca101

Browse files
authored
Merge pull request #37 from JoashZhao/master
feat: add urlname from slug prop
2 parents 78d518b + aabc7c9 commit 40ca101

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

adapter/hexo.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ module.exports = function(post) {
5555
// matter 解析
5656
const parseRet = parseMatter(post.body);
5757
const { body, ...data } = parseRet;
58-
const { title, created_at } = post;
58+
const { title, slug: urlname, created_at } = post;
5959
const raw = formatRaw(body);
6060
const date = data.date || formatDate(created_at);
6161
const tags = data.tags || [];
6262
const props = {
6363
title,
64+
urlname,
6465
date,
6566
...data,
6667
tags: formatTags(tags),

0 commit comments

Comments
 (0)