Skip to content

Commit

Permalink
add rework to books read list
Browse files Browse the repository at this point in the history
  • Loading branch information
DidierRLopes committed Nov 10, 2024
1 parent d7434aa commit 2931e05
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
5 changes: 5 additions & 0 deletions src/components/Books/BooksAlreadyRead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,11 @@ const data = [
author: "Nassim Nicholas Taleb",
image: "/books/skin-in-the-game-hidden-asymmetries-in-daily-life.jpg",
},
{
title: "Rework",
author: "Jason Fried, David Heinemeier Hansson",
image: "/books/rework.jpeg",
},
];

export default function BooksAlreadyRead() {
Expand Down
5 changes: 0 additions & 5 deletions src/components/Books/BooksToRead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,6 @@ const data = [
image:
"/books/built-to-sell-creating-a-business-that-can-thrive-without-you.jpeg",
},
{
title: "Rework",
author: "Jason Fried, David Heinemeier Hansson",
image: "/books/rework.jpeg",
},
{
title: "Resilience: Hard-Won Wisdom for Living a Better Life",
author: "Eric Greitens",
Expand Down
16 changes: 16 additions & 0 deletions src/plugins/blog-post-plugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = (context, options) => ({
name: 'blog-post-plugin',
async contentLoaded({ content, actions }) {
const { setGlobalData } = actions;
const { blogPosts } = content;

const updatedBlogPosts = blogPosts.map((post) => {
const updatedContent =
post.content +
'\n\nThis sentence is added to the end of every blog post.';
return { ...post, content: updatedContent };
});

setGlobalData({ updatedBlogPosts });
},
});

0 comments on commit 2931e05

Please sign in to comment.