Skip to content

Commit

Permalink
for #3 added upsert support and content items for article
Browse files Browse the repository at this point in the history
  • Loading branch information
victorkane committed Sep 5, 2018
1 parent e094a49 commit ad3e454
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
25 changes: 25 additions & 0 deletions cms/content/articles/the-content-migration-rescue-process.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
metaData:
itemSlug: the-content-migration-rescue-process
itemName: The Content Migration Rescue Process
itemType: article
language: en-US
published: true
publishedDate: '2018-09-04T00:00:00.000Z'
createdDate: '2018-09-03T18:40:54.816Z'
modifiedDate: '2018-09-04T00:00:00.000Z'
articleTitle: The Content Migration Rescue Process
articleSubTitle: null
author: 'Victor Kane'
articleBody:
value: |
## Vestibulum ante ipsum primis in faucibus orci luctus

Et ultrices posuere cubilia Curae; Nullam venenatis nisl eu ultricies finibus. Suspendisse egestas id lorem sit amet auctor. Quisque tristique purus non metus dignissim, eu ultrices nisl condimentum. Proin facilisis id mi vel euismod. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam ipsum tellus, luctus lobortis gravida vitae, dictum in erat. Maecenas feugiat sed mauris eu facilisis. Curabitur porttitor lacinia feugiat.
articleSummary:
value: null
tags:
- tagSlug: content-migration-rescue
tagName: Content Migration Rescue
- tagSlug: process
tagName: Process

25 changes: 25 additions & 0 deletions cms/content/articles/what-is-content-migration-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
metaData:
itemSlug: what-is-content-migration-rescue
itemName: What Is Content Migration Rescue
itemType: article
language: en-US
published: true
publishedDate: '2018-09-04T00:00:00.000Z'
createdDate: '2018-09-03T18:40:54.816Z'
modifiedDate: '2018-09-04T00:00:00.000Z'
articleTitle: What is Content Migration Rescue and why do we need it?
articleSubTitle: null
author: 'Victor Kane'
articleSummary:
value: null
articleBody:
value: |
## Quisque ut sodales ipsum

Duis pellentesque eget velit ac ultrices. Proin ut sem eget dui interdum pretium eu at magna. Duis aliquet volutpat euismod. Integer lacus tellus, dictum in augue eget, facilisis ultrices dolor. Nam lacinia, nisl eget rhoncus finibus, elit neque commodo nisi, ac pulvinar ipsum sapien in libero. Donec id purus et turpis maximus aliquet eget a lacus. Nulla at fringilla purus. Etiam rutrum placerat tortor sit amet iaculis. Proin nec enim finibus, condimentum risus sed, efficitur ex. Suspendisse laoreet ante massa. Sed a enim sed libero sagittis cursus vel vel lectus. Etiam tincidunt ac dui ac bibendum. Vivamus in nibh nisi. Maecenas interdum tellus justo, nec porttitor augue auctor nec. Mauris iaculis iaculis lorem, non accumsan felis suscipit eget.
tags:
- tagSlug: content-migration-rescue
tagName: Content Migration Rescue
- tagSlug: faq
tagName: FAQ

3 changes: 2 additions & 1 deletion cms/upsert/upsert.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fs.readFile(file, 'utf8', function (err,content) {
// console.log(util.inspect(contentItem, { showHidden: false, depth: null}))
// return
// console.log('theUri', theUri)
if (contentType === 'poems') {
if (contentType === 'articles') {
rp({
method: 'GET',
uri: apiHost + '/api/authors?itemName=' + contentItem.author + '&select=_id',
Expand Down Expand Up @@ -114,3 +114,4 @@ fs.readFile(file, 'utf8', function (err,content) {
})
}
})

0 comments on commit ad3e454

Please sign in to comment.