feat(core): Enhanced post fetching and creation with additional metadata and support for HTML source

This commit is contained in:
2024-07-06 17:47:06 +02:00
parent 5d3cfe2f93
commit d82c58e608
5 changed files with 106 additions and 7 deletions

View File

@ -19,7 +19,15 @@ tap.test('should get posts', async () => {
const posts = await testGhostInstance.getPosts();
expect(posts).toBeArray();
expect(posts[0]).toBeInstanceOf(ghost.Post);
console.log(posts.map((post) => post.getTitle()));
console.log(JSON.stringify(posts[0].postData, null, 2));
posts.map((post) => {
// console.log(JSON.stringify(post.postData, null, 2));
console.log(`-> ${post.getTitle()}`);
console.log(`by ${post.getAuthor().name}`)
console.log(post.getExcerpt());
console.log(`===============`)
})
})
tap.start()