Skip to content

Commit

Permalink
fix virtual(permalink).get()
Browse files Browse the repository at this point in the history
  • Loading branch information
sKawashima committed Jun 29, 2019
1 parent 19bec9a commit a423068
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/models/category.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = ctx => {
});

Category.virtual('permalink').get(function() {
return `${ctx.config.url}/${this.path}`;
return `${ctx.config.url}${ctx.config.root}${this.path}`;
});

Category.virtual('posts').get(function() {
Expand Down
2 changes: 1 addition & 1 deletion lib/models/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = ctx => {
});

Page.virtual('permalink').get(function() {
return `${ctx.config.url}/${this.path}`;
return `${ctx.config.url}${ctx.config.root}${this.path}`;
});

Page.virtual('full_source').get(function() {
Expand Down
2 changes: 1 addition & 1 deletion lib/models/tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = ctx => {
});

Tag.virtual('permalink').get(function() {
return `${ctx.config.url}/${this.path}`;
return `${ctx.config.url}${ctx.config.root}${this.path}`;
});

Tag.virtual('posts').get(function() {
Expand Down

0 comments on commit a423068

Please sign in to comment.