Skip to content

Commit

Permalink
fix(preset-hugo): add missing like-of property
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed May 30, 2021
1 parent aaf1269 commit 75da03d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/preset-hugo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export const HugoPreset = class {
...(properties.photo && {images: properties.photo}),
...(properties.video && {videos: properties.video}),
...(properties['bookmark-of'] && {'bookmark-of': properties['bookmark-of']}),
...(properties['like-of'] && {'bookmark-of': properties['like-of']}),
...(properties['like-of'] && {'like-of': properties['like-of']}),
...(properties['repost-of'] && {'repost-of': properties['repost-of']}),
...(properties['in-reply-to'] && {'in-reply-to': properties['in-reply-to']}),
...(properties['post-status'] === 'draft' && {draft: true}),
Expand Down
3 changes: 3 additions & 0 deletions packages/preset-hugo/tests/unit/preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ test('Renders post template with JSON frontmatter', t => {
}
],
"bookmark-of": "https://website.example",
"like-of": "https://website.example",
"repost-of": "https://website.example",
"in-reply-to": "https://website.example",
"draft": true,
Expand All @@ -130,6 +131,7 @@ start = "2020-02-02"
end = "2020-02-20"
rsvp = "Yes"
bookmark-of = "https://website.example"
like-of = "https://website.example"
repost-of = "https://website.example"
in-reply-to = "https://website.example"
draft = true
Expand Down Expand Up @@ -192,6 +194,7 @@ images:
videos:
- url: https://website.example/video.mp4
bookmark-of: https://website.example
like-of: https://website.example
repost-of: https://website.example
in-reply-to: https://website.example
draft: true
Expand Down

0 comments on commit 75da03d

Please sign in to comment.