From 2915f4d9618c6f527d395e31db5ed293f03673e0 Mon Sep 17 00:00:00 2001 From: khalilcodes Date: Thu, 16 Jun 2022 16:38:15 +0300 Subject: [PATCH 01/14] [site/content][xs]: set featured to true --- notes/are-crypto-tokens-securities.md | 2 +- notes/collective-action-problems-and-climate-change.md | 2 +- notes/cory-doctorow-on-blockchain.md | 2 +- notes/fintech-incrementalism-and-responsible-innovation.md | 2 +- notes/market-fundamentalism.md | 2 +- notes/neo-metallism.md | 5 +---- notes/on-the-potential-of-DAOs-and-Web3.md | 2 +- notes/pia-mancini-open-collective-dialogue.md | 2 +- notes/post-state-technocracy.md | 2 +- notes/richard-bartlett-and-stephen-reid.md | 2 +- 10 files changed, 10 insertions(+), 13 deletions(-) diff --git a/notes/are-crypto-tokens-securities.md b/notes/are-crypto-tokens-securities.md index 99adad3..c16dac4 100644 --- a/notes/are-crypto-tokens-securities.md +++ b/notes/are-crypto-tokens-securities.md @@ -5,7 +5,7 @@ created: 2022-04-13 description: "In episode #3 of our ongoing deep dive into web3 and crypto, we explore the nature of financial products known as 'securities', their relation to crypto tokens, and the regulatory framework that exists around these structures." youtube: https://www.youtube.com/embed/z2uAg-AIs-Y podcast: https://anchor.fm/life-itself/episodes/Are-Cryptocurrencies-Securities--The-Nature-of-Securities--Their-Relation-to-Crypto-Tokens-with-Stephen-Diehl-e1fph69 -featured: false +featured: true aliases: notes/are-crypto-tokens-securities.md --- diff --git a/notes/collective-action-problems-and-climate-change.md b/notes/collective-action-problems-and-climate-change.md index fe5724b..f8b364a 100644 --- a/notes/collective-action-problems-and-climate-change.md +++ b/notes/collective-action-problems-and-climate-change.md @@ -6,7 +6,7 @@ description: 'In this episode we use the example of KlimaDAO to explore the inte image: /img/Collective Action Climate.jpg youtube: https://www.youtube.com/watch?v=SLXtnCL6IxE podcast: https://anchor.fm/life-itself/episodes/Collective-Action-Problems--Climate-Change-e1h4o6e/a-a7gpq18 -featured: false +featured: true aliases: notes/collective-action-problems-and-climate-change.md --- diff --git a/notes/cory-doctorow-on-blockchain.md b/notes/cory-doctorow-on-blockchain.md index ba30f98..2228f1e 100644 --- a/notes/cory-doctorow-on-blockchain.md +++ b/notes/cory-doctorow-on-blockchain.md @@ -5,7 +5,7 @@ created: 2022-04-26 description: "In this episode of our Making Sense of Crypto and Web3 series, Rufus Pollock is joined by activist, journalist and author Cory Doctorow. Cory outlines the problems he sees within the web3 space; economic, technological, and ethical." youtube: https://youtu.be/1eUMD5MoQdo podcast: https://anchor.fm/life-itself/episodes/Cory-Doctorow-on-Blockchain--Crypto--Web3-e1hmcfk/a-a7gpq18 -featured: false +featured: true aliases: notes/cory-doctorow-on-blockchain.md --- diff --git a/notes/fintech-incrementalism-and-responsible-innovation.md b/notes/fintech-incrementalism-and-responsible-innovation.md index 44f0031..969812b 100644 --- a/notes/fintech-incrementalism-and-responsible-innovation.md +++ b/notes/fintech-incrementalism-and-responsible-innovation.md @@ -5,7 +5,7 @@ date: 2022-04-04 description: "In episode #5 of our ongoing deep dive into web3 and crypto, Rufus Pollock and Stephen Diehl explore the claim that blockchain can be a vehicle for increase in financialization through the development of more complex, blockchain-based financial products." youtube: https://www.youtube.com/watch?v=7rLQoTtwRSU&t=4s podcast: https://anchor.fm/life-itself/episodes/Fintech-Incrementalism-and-Responsible-Innovation-e1gn02u -featured: false +featured: true aliases: notes/fintech-incrementalism-and-responsible-innovation.md --- diff --git a/notes/market-fundamentalism.md b/notes/market-fundamentalism.md index fc19b2a..95f1af3 100644 --- a/notes/market-fundamentalism.md +++ b/notes/market-fundamentalism.md @@ -4,7 +4,7 @@ date: 2022-03-04 description: "In episode #2 of the series, Rufus Pollock and Stephen Diehl explore a common incentive for investing in crypto: the belief - held by day traders and quantitative hedge funds alike - that crypto can make those who trade it a lot of money. Particular focus in this episode is placed on the 'market fundamentalist' position." youtube: https://www.youtube.com/watch?v=K5JtPTyc0y0 podcast: https://anchor.fm/life-itself/episodes/Crypto--Traders-and-Unfettered-Financial-Markets-with-Stephen-Diehl-e1fgm2d -featured: false +featured: true aliases: notes/market-fundamentalism.md --- diff --git a/notes/neo-metallism.md b/notes/neo-metallism.md index 3fcb84e..d22715d 100644 --- a/notes/neo-metallism.md +++ b/notes/neo-metallism.md @@ -6,13 +6,10 @@ image: /img/Neo-metallism_Thumb_vo3dhs.png description: "In this episode we examine Bitcoin and the Neo-Metallist thesis, i.e. that a gold-standard was a good idea and a Bitcoin-standard would be even better." youtube: https://www.youtube.com/embed/_o7pRFLzJHY podcast: https://anchor.fm/life-itself/episodes/Stephen-Diehl-on-Web3--Bitcoin--Neometalism-e1f5rca -featured: false +featured: true aliases: notes/neo-metallism.md --- -{/* https://www.youtube.com/watch?v=_o7pRFLzJHY&t=568s */} - -{/* Podcast: https://anchor.fm/life-itself/episodes/Stephen-Diehl-on-Web3--Bitcoin--Neometalism-e1f5rca */} * Wiki topic: [is-digital-gold](../claims/is-digital-gold.md) *** diff --git a/notes/on-the-potential-of-DAOs-and-Web3.md b/notes/on-the-potential-of-DAOs-and-Web3.md index bdf8026..093110f 100644 --- a/notes/on-the-potential-of-DAOs-and-Web3.md +++ b/notes/on-the-potential-of-DAOs-and-Web3.md @@ -5,7 +5,7 @@ created: 2022-03-01 description: "In this episode with Jordan Hall we discuss the potential of DAOs for social change." youtube: https://youtu.be/aQvpgYW0o7M podcast: https://anchor.fm/life-itself/episodes/Jordan-Hall-on-the-Potential-of-DAOs-e1f5rm9/a-a7gpq18 -featured: false +featured: true aliases: notes/on-the-potential-of-DAOs-and-Web3.md --- diff --git a/notes/pia-mancini-open-collective-dialogue.md b/notes/pia-mancini-open-collective-dialogue.md index b6e0e37..cc9d337 100644 --- a/notes/pia-mancini-open-collective-dialogue.md +++ b/notes/pia-mancini-open-collective-dialogue.md @@ -5,7 +5,7 @@ date: 2022-04-08 description: 'In this episode with Pia Mancini about her work to make community finance transparent and sustainable with Open Collective, her commitment ot steward ownership and the value of an exit to community.' image: /img/Pia Mancini Thumbnail.jpg youtube: https://www.youtube.com/watch?v=C2KYJiQVtIM -featured: false +featured: true aliases: notes/pia-mancini-open-collective-dialogue.md --- diff --git a/notes/post-state-technocracy.md b/notes/post-state-technocracy.md index d5304b0..18b6cdc 100644 --- a/notes/post-state-technocracy.md +++ b/notes/post-state-technocracy.md @@ -6,7 +6,7 @@ description: "In this episode we explore the aspirational transition from the ex image: /img/post-state-technocracy.jpg youtube: https://www.youtube.com/watch?v=gZ0iCJkM3PU podcast: https://anchor.fm/life-itself/episodes/On-Web3-and-Post-State-Technocracy-with-Stephen-Diehl--Rufus-Pollock-e1g4cpe -featured: false +featured: true aliases: notes/post-state-technocracy.md --- diff --git a/notes/richard-bartlett-and-stephen-reid.md b/notes/richard-bartlett-and-stephen-reid.md index bdf0cb4..0b82418 100644 --- a/notes/richard-bartlett-and-stephen-reid.md +++ b/notes/richard-bartlett-and-stephen-reid.md @@ -5,7 +5,7 @@ created: 2022-01-26 description: "Just what is Web3, why are people so excited about it, and how likely is it to really change the world? In this episode, Life Itself co-founder Rufus Pollock talks with Rich Bartlett and Stephen Reid on the promises, possibilities and pitfalls of Web3." youtube: https://youtu.be/bBP5cKAbAug podcast: https://anchor.fm/life-itself/episodes/Richard-D--Bartlett--Stephen-Reid-on-Critical-Exploration-of-Web3-e1f5q1f/a-a7gpq18 -featured: false +featured: true aliases: notes/richard-bartlett-and-stephen-reid.md --- From 39d02329f49a75cca9d1caea2f2772a9f5eba016 Mon Sep 17 00:00:00 2001 From: khalilcodes Date: Thu, 16 Jun 2022 16:40:07 +0300 Subject: [PATCH 02/14] [site/images][s]: create function to fetch youtube id and thumbnail --- site/utils/getYoutube.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 site/utils/getYoutube.js diff --git a/site/utils/getYoutube.js b/site/utils/getYoutube.js new file mode 100644 index 0000000..4eef886 --- /dev/null +++ b/site/utils/getYoutube.js @@ -0,0 +1,21 @@ +import { YOUTUBE_REGEX, YOUTUBE_ID_REGEX } from "lib/constants"; + +export function getYoutube(youtube) { + let youtubeThumbnail; + + const youtubeId = + youtube && YOUTUBE_REGEX.test(youtube) && youtube.match(YOUTUBE_ID_REGEX)[1]; + + if (youtubeId) { + // get the youtube thumbnail image from https://img.youtube.com/vi//maxresdefault.jpg + youtubeThumbnail = youtube.replace( + YOUTUBE_REGEX, + `https://img.youtube.com/vi/${youtubeId}/maxresdefault.jpg` + ); + } + + return { + id: youtubeId, + thumbnail: youtubeThumbnail + }; +} From c53a0389831fbff3c08068d2417e56becb1c4d7c Mon Sep 17 00:00:00 2001 From: khalilcodes Date: Thu, 16 Jun 2022 16:41:12 +0300 Subject: [PATCH 03/14] [site/lib][xs]: add youtube id regex --- site/lib/constants.js | 1 + 1 file changed, 1 insertion(+) diff --git a/site/lib/constants.js b/site/lib/constants.js index 7df911b..5b6e54c 100644 --- a/site/lib/constants.js +++ b/site/lib/constants.js @@ -1,3 +1,4 @@ export const YOUTUBE_REGEX = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/; +export const YOUTUBE_ID_REGEX = /(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com\/(?:(?:watch)?\?(?:\S*&)?vi?=|(?:embed|v|vi|user|shorts)\/))([^?&\"'>\s]+)/ export const TWITTER_REGEX = /^https?:\/\/twitter\.com\/(?:#!\/)?(\w+)\/status(es)?\/(\d+)/; From 204af9a446ba736bfa1cc3025d781f0b0df2129a Mon Sep 17 00:00:00 2001 From: khalilcodes Date: Thu, 16 Jun 2022 16:43:57 +0300 Subject: [PATCH 04/14] [site/mdx][s]: replace youtube logic --- site/components/MDX.js | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/site/components/MDX.js b/site/components/MDX.js index 89e34f6..87b0f6d 100644 --- a/site/components/MDX.js +++ b/site/components/MDX.js @@ -1,26 +1,15 @@ import { NextSeo } from "next-seo"; -import LiteYouTubeEmbed from "react-lite-youtube-embed"; - -import { YOUTUBE_REGEX } from "../lib/constants"; -import siteConfig from "../config/siteConfig"; import MdxContent from "./MdxContent"; +import siteConfig from "../config/siteConfig"; + +import LiteYouTubeEmbed from "react-lite-youtube-embed"; +import { getYoutube } from "utils/getYoutube" export default function MdxPage({ body, meta }) { const { title, description, date, keywords, youtube, podcast, image, _raw } = meta; - let youtubeThumnbnail; - - const youtubeId = - youtube && YOUTUBE_REGEX.test(youtube) && youtube.split(/^|=|\//).pop(); - - if (youtubeId && !image) { - // get the youtube thumbnail image from https://img.youtube.com/vi//maxresdefault.jpg - youtubeThumnbnail = youtube.replace( - YOUTUBE_REGEX, - `https://img.youtube.com/vi/${youtubeId}/maxresdefault.jpg` - ); - } + const { id: youtubeId, thumbnail: youtubeThumnbnail } = getYoutube(youtube) const PodcastIcon = siteConfig.social.find((s) => s.name === "Podcast").icon; From 4cbe9ff6edd2d0a23d5fedb7a38b827bb8a3901f Mon Sep 17 00:00:00 2001 From: khalilcodes Date: Thu, 16 Jun 2022 16:45:42 +0300 Subject: [PATCH 05/14] [site/home][s]: add logic for images and improve card styles --- site/components/Home/Latest.js | 87 +++++++++++++++++++++++----------- 1 file changed, 60 insertions(+), 27 deletions(-) diff --git a/site/components/Home/Latest.js b/site/components/Home/Latest.js index d12c367..614e604 100644 --- a/site/components/Home/Latest.js +++ b/site/components/Home/Latest.js @@ -1,4 +1,20 @@ +// import { useState } from "react" +import Link from "next/link" +import { YOUTUBE_REGEX } from "../../lib/constants" +import { getYoutube } from "../../utils/getYoutube" + export function Latest({ posts }) { + // const initialValue = 6 + // const [ value, setValue ] = useState(initialValue) + // const initialPosts = posts && posts.slice(0, value) + + // const handleButton = () => { + // setValue(prev => + // initialPosts.length === posts.length + // ? initialValue + // : prev + 3) + // } + return (
@@ -11,37 +27,54 @@ export function Latest({ posts }) { Our latest articles and explorations.

-
- {posts && posts.map((post) => ( -
- {post.image ? -
- {post.title} -
- :
- } -
- + {/*
+ {!(posts.length === initialPosts.length && value === initialValue) && + + } +
*/}
) From 9a0eafe7df662facabd6d41c6acfda562b072846 Mon Sep 17 00:00:00 2001 From: khalilcodes Date: Thu, 16 Jun 2022 16:46:18 +0300 Subject: [PATCH 06/14] [site/pages][s]: create demo page for Latest releases --- site/pages/demo.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 site/pages/demo.js diff --git a/site/pages/demo.js b/site/pages/demo.js new file mode 100644 index 0000000..782291e --- /dev/null +++ b/site/pages/demo.js @@ -0,0 +1,25 @@ +import { Latest } from "components/Home/Latest" +import { allOtherPages } from "contentlayer/generated" + +export default function Demo ({ deepDivePages }) { + return +} + +export async function getStaticProps() { + const deepDivePages = allOtherPages + .filter((page) => page.featured !== undefined && page.featured) + .sort((a, b) => new Date(b.date) - new Date(a.date)) + .map((page) => { + return { + title: page.title ?? null, + description: page.description ?? null, + image: page.image ?? null, + youtube: page.youtube ?? null, + link: `/${page._raw.flattenedPath}`, + }; + }); + + return { + props: { deepDivePages } + } +} \ No newline at end of file From f970e70c755b299d12d94b4e85e4278b9a7c629d Mon Sep 17 00:00:00 2001 From: khalilcodes Date: Thu, 16 Jun 2022 20:08:12 +0300 Subject: [PATCH 07/14] [site/content][xs]: add image for deep dive page --- notes/are-crypto-tokens-securities.md | 1 + notes/cory-doctorow-on-blockchain.md | 1 + notes/fintech-incrementalism-and-responsible-innovation.md | 1 + notes/market-fundamentalism.md | 1 + notes/on-the-potential-of-DAOs-and-Web3.md | 1 + notes/richard-bartlett-and-stephen-reid.md | 1 + site/public/img/are-crypto-tokens -securities-thumbnail.jpg | 3 +++ site/public/img/cory-doctorow-on-blockchain-thumbnail.jpg | 3 +++ site/public/img/fintech-incrementalism-thumbnail.jpg | 3 +++ .../public/img/richard-bartlett-and-stephen-reid-thumbnail.jpg | 3 +++ 10 files changed, 18 insertions(+) create mode 100644 site/public/img/are-crypto-tokens -securities-thumbnail.jpg create mode 100644 site/public/img/cory-doctorow-on-blockchain-thumbnail.jpg create mode 100644 site/public/img/fintech-incrementalism-thumbnail.jpg create mode 100644 site/public/img/richard-bartlett-and-stephen-reid-thumbnail.jpg diff --git a/notes/are-crypto-tokens-securities.md b/notes/are-crypto-tokens-securities.md index c16dac4..0165d95 100644 --- a/notes/are-crypto-tokens-securities.md +++ b/notes/are-crypto-tokens-securities.md @@ -3,6 +3,7 @@ title: Are Crypto Tokens Securities? date: 2022-02-17 created: 2022-04-13 description: "In episode #3 of our ongoing deep dive into web3 and crypto, we explore the nature of financial products known as 'securities', their relation to crypto tokens, and the regulatory framework that exists around these structures." +image: /img/are-crypto-tokens -securities-thumbnail.jpg youtube: https://www.youtube.com/embed/z2uAg-AIs-Y podcast: https://anchor.fm/life-itself/episodes/Are-Cryptocurrencies-Securities--The-Nature-of-Securities--Their-Relation-to-Crypto-Tokens-with-Stephen-Diehl-e1fph69 featured: true diff --git a/notes/cory-doctorow-on-blockchain.md b/notes/cory-doctorow-on-blockchain.md index 2228f1e..96de76c 100644 --- a/notes/cory-doctorow-on-blockchain.md +++ b/notes/cory-doctorow-on-blockchain.md @@ -3,6 +3,7 @@ title: Cory Doctorow on Blockchain, Crypto & Web3 date: 2022-04-26 created: 2022-04-26 description: "In this episode of our Making Sense of Crypto and Web3 series, Rufus Pollock is joined by activist, journalist and author Cory Doctorow. Cory outlines the problems he sees within the web3 space; economic, technological, and ethical." +image: /img/cory-doctorow-on-blockchain-thumbnail.jpg youtube: https://youtu.be/1eUMD5MoQdo podcast: https://anchor.fm/life-itself/episodes/Cory-Doctorow-on-Blockchain--Crypto--Web3-e1hmcfk/a-a7gpq18 featured: true diff --git a/notes/fintech-incrementalism-and-responsible-innovation.md b/notes/fintech-incrementalism-and-responsible-innovation.md index 969812b..2d6d296 100644 --- a/notes/fintech-incrementalism-and-responsible-innovation.md +++ b/notes/fintech-incrementalism-and-responsible-innovation.md @@ -3,6 +3,7 @@ title: Fintech Incrementalism and Responsible Innovation created: 2022-04-04 date: 2022-04-04 description: "In episode #5 of our ongoing deep dive into web3 and crypto, Rufus Pollock and Stephen Diehl explore the claim that blockchain can be a vehicle for increase in financialization through the development of more complex, blockchain-based financial products." +image: /img/fintech-incrementalism-thumbnail.jpg youtube: https://www.youtube.com/watch?v=7rLQoTtwRSU&t=4s podcast: https://anchor.fm/life-itself/episodes/Fintech-Incrementalism-and-Responsible-Innovation-e1gn02u featured: true diff --git a/notes/market-fundamentalism.md b/notes/market-fundamentalism.md index 95f1af3..fe3f53d 100644 --- a/notes/market-fundamentalism.md +++ b/notes/market-fundamentalism.md @@ -2,6 +2,7 @@ title: Market Fundamentalism date: 2022-03-04 description: "In episode #2 of the series, Rufus Pollock and Stephen Diehl explore a common incentive for investing in crypto: the belief - held by day traders and quantitative hedge funds alike - that crypto can make those who trade it a lot of money. Particular focus in this episode is placed on the 'market fundamentalist' position." +image: /img/Market_Fundamentalism_Thumbnail_nn19qa.png youtube: https://www.youtube.com/watch?v=K5JtPTyc0y0 podcast: https://anchor.fm/life-itself/episodes/Crypto--Traders-and-Unfettered-Financial-Markets-with-Stephen-Diehl-e1fgm2d featured: true diff --git a/notes/on-the-potential-of-DAOs-and-Web3.md b/notes/on-the-potential-of-DAOs-and-Web3.md index 093110f..99f67cb 100644 --- a/notes/on-the-potential-of-DAOs-and-Web3.md +++ b/notes/on-the-potential-of-DAOs-and-Web3.md @@ -3,6 +3,7 @@ title: On the Potential of DAOs & Web3 with Jordan Hall & Rufus Pollock date: 2022-03-01 created: 2022-03-01 description: "In this episode with Jordan Hall we discuss the potential of DAOs for social change." +image: /img/Potential_of_DAOs_Thumb_ko4vpa.png youtube: https://youtu.be/aQvpgYW0o7M podcast: https://anchor.fm/life-itself/episodes/Jordan-Hall-on-the-Potential-of-DAOs-e1f5rm9/a-a7gpq18 featured: true diff --git a/notes/richard-bartlett-and-stephen-reid.md b/notes/richard-bartlett-and-stephen-reid.md index 0b82418..5565d4c 100644 --- a/notes/richard-bartlett-and-stephen-reid.md +++ b/notes/richard-bartlett-and-stephen-reid.md @@ -3,6 +3,7 @@ title: Richard D. Bartlett, Stephen Reid & Rufus Pollock on Critical Exploration date: 2022-01-26 created: 2022-01-26 description: "Just what is Web3, why are people so excited about it, and how likely is it to really change the world? In this episode, Life Itself co-founder Rufus Pollock talks with Rich Bartlett and Stephen Reid on the promises, possibilities and pitfalls of Web3." +image: /img/richard-bartlett-and-stephen-reid-thumbnail.jpg youtube: https://youtu.be/bBP5cKAbAug podcast: https://anchor.fm/life-itself/episodes/Richard-D--Bartlett--Stephen-Reid-on-Critical-Exploration-of-Web3-e1f5q1f/a-a7gpq18 featured: true diff --git a/site/public/img/are-crypto-tokens -securities-thumbnail.jpg b/site/public/img/are-crypto-tokens -securities-thumbnail.jpg new file mode 100644 index 0000000..5cd6e2a --- /dev/null +++ b/site/public/img/are-crypto-tokens -securities-thumbnail.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86dd7efcecbf25c386bb4446db6f63bb523c3ff312fcc33c7c1c0bf67c595673 +size 62222 diff --git a/site/public/img/cory-doctorow-on-blockchain-thumbnail.jpg b/site/public/img/cory-doctorow-on-blockchain-thumbnail.jpg new file mode 100644 index 0000000..27a9a64 --- /dev/null +++ b/site/public/img/cory-doctorow-on-blockchain-thumbnail.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddeaaa2b8a8f0b3b8e0eb033d8945f652a7e4fdddeb168c8ef2ed21ee55eab3c +size 73376 diff --git a/site/public/img/fintech-incrementalism-thumbnail.jpg b/site/public/img/fintech-incrementalism-thumbnail.jpg new file mode 100644 index 0000000..800f7e2 --- /dev/null +++ b/site/public/img/fintech-incrementalism-thumbnail.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a0554c45c4ffdc843020fdefa19d2b99e11e26b18753e4904cee4f945d45a5a +size 112451 diff --git a/site/public/img/richard-bartlett-and-stephen-reid-thumbnail.jpg b/site/public/img/richard-bartlett-and-stephen-reid-thumbnail.jpg new file mode 100644 index 0000000..6b5d631 --- /dev/null +++ b/site/public/img/richard-bartlett-and-stephen-reid-thumbnail.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc64cbb4d18a0350a1eddca3f9b418d2c17b2064797611708e1af7f187e6548c +size 139829 From 9d349542939f20e10209339905ea9ae2edb22b9a Mon Sep 17 00:00:00 2001 From: khalilcodes Date: Thu, 16 Jun 2022 20:11:25 +0300 Subject: [PATCH 08/14] [site/mdx][s]: remove youtube thumbnail logic --- site/components/Home/Latest.js | 43 +++++----------------------------- site/components/MDX.js | 10 +++----- site/pages/demo.js | 25 -------------------- site/utils/getYoutube.js | 21 ----------------- 4 files changed, 9 insertions(+), 90 deletions(-) delete mode 100644 site/pages/demo.js delete mode 100644 site/utils/getYoutube.js diff --git a/site/components/Home/Latest.js b/site/components/Home/Latest.js index 614e604..73c9403 100644 --- a/site/components/Home/Latest.js +++ b/site/components/Home/Latest.js @@ -1,20 +1,7 @@ -// import { useState } from "react" import Link from "next/link" import { YOUTUBE_REGEX } from "../../lib/constants" -import { getYoutube } from "../../utils/getYoutube" export function Latest({ posts }) { - // const initialValue = 6 - // const [ value, setValue ] = useState(initialValue) - // const initialPosts = posts && posts.slice(0, value) - - // const handleButton = () => { - // setValue(prev => - // initialPosts.length === posts.length - // ? initialValue - // : prev + 3) - // } - return (
@@ -28,22 +15,10 @@ export function Latest({ posts }) {

- {posts && posts.map(({ _id, title, description, image, youtube, link }) => { - const { thumbnail } = getYoutube(youtube) - const imageSource = image || thumbnail - return ( -
+ {posts && posts.map(({ title, description, image, youtube, link }) => ( + - ) - })} + ))}
- {/*
- {!(posts.length === initialPosts.length && value === initialValue) && - - } -
*/}
) diff --git a/site/components/MDX.js b/site/components/MDX.js index b4afab5..b9f6763 100644 --- a/site/components/MDX.js +++ b/site/components/MDX.js @@ -3,13 +3,13 @@ import MdxContent from "./MdxContent"; import siteConfig from "../config/siteConfig"; import LiteYouTubeEmbed from "react-lite-youtube-embed"; -import { getYoutube } from "utils/getYoutube" +import { YOUTUBE_REGEX, YOUTUBE_ID_REGEX } from "lib/constants"; export default function MdxPage({ body, meta }) { const { title, description, date, keywords, youtube, podcast, image, _raw } = meta; - const { id: youtubeId, thumbnail: youtubeThumnbnail } = getYoutube(youtube) + const youtubeId = youtube && YOUTUBE_REGEX.test(youtube) && youtube.match(YOUTUBE_ID_REGEX)[1] const PodcastIcon = siteConfig.social.find((s) => s.name === "Podcast").icon; @@ -21,11 +21,7 @@ export default function MdxPage({ body, meta }) { .replace(/(^\w{1})|(\s{1}\w{1})/g, (str) => str.toUpperCase()); const SeoTitle = title ?? titleFromUrl; - const imageUrl = image - ? siteConfig.url + image - : youtubeThumnbnail - ? youtubeThumnbnail - : null; + const imageUrl = image ? siteConfig.url + image : null; // enable editing for all pages for now const editUrl = siteConfig.repoRoot + siteConfig.repoEditPath + _raw.sourceFilePath diff --git a/site/pages/demo.js b/site/pages/demo.js deleted file mode 100644 index 782291e..0000000 --- a/site/pages/demo.js +++ /dev/null @@ -1,25 +0,0 @@ -import { Latest } from "components/Home/Latest" -import { allOtherPages } from "contentlayer/generated" - -export default function Demo ({ deepDivePages }) { - return -} - -export async function getStaticProps() { - const deepDivePages = allOtherPages - .filter((page) => page.featured !== undefined && page.featured) - .sort((a, b) => new Date(b.date) - new Date(a.date)) - .map((page) => { - return { - title: page.title ?? null, - description: page.description ?? null, - image: page.image ?? null, - youtube: page.youtube ?? null, - link: `/${page._raw.flattenedPath}`, - }; - }); - - return { - props: { deepDivePages } - } -} \ No newline at end of file diff --git a/site/utils/getYoutube.js b/site/utils/getYoutube.js deleted file mode 100644 index 4eef886..0000000 --- a/site/utils/getYoutube.js +++ /dev/null @@ -1,21 +0,0 @@ -import { YOUTUBE_REGEX, YOUTUBE_ID_REGEX } from "lib/constants"; - -export function getYoutube(youtube) { - let youtubeThumbnail; - - const youtubeId = - youtube && YOUTUBE_REGEX.test(youtube) && youtube.match(YOUTUBE_ID_REGEX)[1]; - - if (youtubeId) { - // get the youtube thumbnail image from https://img.youtube.com/vi//maxresdefault.jpg - youtubeThumbnail = youtube.replace( - YOUTUBE_REGEX, - `https://img.youtube.com/vi/${youtubeId}/maxresdefault.jpg` - ); - } - - return { - id: youtubeId, - thumbnail: youtubeThumbnail - }; -} From 83a41111b1ed8c45d6b3e2e216985b7b03152a10 Mon Sep 17 00:00:00 2001 From: khalilcodes Date: Thu, 16 Jun 2022 20:18:37 +0300 Subject: [PATCH 09/14] [site/content][xs]: fix markdown frontmatter --- ...-macroeconomics-perspective-on-cryptocurrencies.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/notes/a-macroeconomics-perspective-on-cryptocurrencies.md b/notes/a-macroeconomics-perspective-on-cryptocurrencies.md index a6471dd..c48ef9a 100644 --- a/notes/a-macroeconomics-perspective-on-cryptocurrencies.md +++ b/notes/a-macroeconomics-perspective-on-cryptocurrencies.md @@ -5,16 +5,7 @@ created: 2022-04-03 description: "In this episode of our Making Sense of crypto and web3 series, Stephen Diehl is joined by economist and data scientist, Matthew Ranger, in a discussion on crypto assets from the perspective of an economist." image: /img/a-macro-economics-thumbnail.png youtube: https://youtu.be/bLRsmn1Tsn8 +podcast: https://anchor.fm/life-itself/episodes/A-Macroeconomics-Perspective-on-Cryptocurrencies-e1hv8b4 featured: true aliases: notes/a-macroeconomics-perspective-on-cryptocurrencies.md --- - ---- -title: A Macroeconomics Perspective on Cryptocurrencies -date: 2022-05-03 -created: 2022-04-03 -description: "In this episode of our Making Sense of crypto and web3 series, Stephen Diehl is joined by economist and data scientist, Matthew Ranger, in a discussion on crypto assets from the perspective of an economist." -youtube: https://youtu.be/bLRsmn1Tsn8 -podcast: https://anchor.fm/life-itself/episodes/A-Macroeconomics-Perspective-on-Cryptocurrencies-e1hv8b4 -aliases: notes/a-macroeconomics-perspective-on-cryptocurrencies.md ---- From efd9e0bebd435cb99faf1b99217c3d77afc1fe2e Mon Sep 17 00:00:00 2001 From: khalilcodes Date: Fri, 17 Jun 2022 14:30:39 +0300 Subject: [PATCH 10/14] [site/nav][xs]: add notes link to navbar --- site/config/navLinks.js | 1 + 1 file changed, 1 insertion(+) diff --git a/site/config/navLinks.js b/site/config/navLinks.js index 36ad060..8bba04d 100644 --- a/site/config/navLinks.js +++ b/site/config/navLinks.js @@ -3,6 +3,7 @@ const navLinks = [ { href: '/guide', name: 'Guide' }, { href: '/claims', name: 'Claims' }, { href: '/library', name: 'Library' }, + { href: '/notes', name: 'Notes' }, { href: '/webinars', name: 'Webinars' }, { href: '/contribute', name: 'Contribute' }, ] From 491046a173f06b76fe142e65caa77e34382ee353 Mon Sep 17 00:00:00 2001 From: khalilcodes Date: Fri, 17 Jun 2022 14:31:29 +0300 Subject: [PATCH 11/14] [site/pages][s]: create notes page --- site/pages/notes.js | 68 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 site/pages/notes.js diff --git a/site/pages/notes.js b/site/pages/notes.js new file mode 100644 index 0000000..4bc7dde --- /dev/null +++ b/site/pages/notes.js @@ -0,0 +1,68 @@ +import Link from "next/link"; +import { allOtherPages } from "contentlayer/generated" +import { YOUTUBE_REGEX } from "lib/constants"; + +export async function getStaticProps() { + const posts = allOtherPages + .filter((page) => page._raw.sourceFileDir === "notes") + .map((page) => { + return { + title: page.title || null, + description: page.description || null, + date: page.date, + image: page.image || null, + youtube: page.youtube || null, + link: `/${page._raw.flattenedPath}`, + }; + }) + .sort((a, b) => new Date(b.date) - new Date(a.date)); + + return { props: { posts } }; +} + +export default function Notes({ posts }) { + return ( + + ); +} \ No newline at end of file From 76275b4c2e1fef8d97bd5d29bd7e0f8bc1fade5e Mon Sep 17 00:00:00 2001 From: EilidhRoss1 <98904290+EilidhRoss1@users.noreply.github.com> Date: Mon, 20 Jun 2022 10:01:06 +0100 Subject: [PATCH 12/14] podcast link fix --- notes/bitcoin-as-anti-authoritarian.md | 1 + 1 file changed, 1 insertion(+) diff --git a/notes/bitcoin-as-anti-authoritarian.md b/notes/bitcoin-as-anti-authoritarian.md index 64a2a9e..6304b37 100644 --- a/notes/bitcoin-as-anti-authoritarian.md +++ b/notes/bitcoin-as-anti-authoritarian.md @@ -5,6 +5,7 @@ created: 2022-05-02 description: "Episode #7 of our ongoing deep dive into web3 and crypto with Rufus Pollock and Stephen Diehl. This week we’re exploring the thesis that Bitcoin (and crypto more generally) is an anti-authoritarian force and can help undermine tyranny." image: /img/anti-auth-thumbnail.png youtube: https://youtu.be/U_-Bdx1mqS8 +podcast: https://anchor.fm/life-itself/episodes/Bitcoin-as-an-Anti-Authoritarian-Force-e1i25vg/a-a7gpq18 featured: true aliases: notes/bitcoin-as-anti-authoritarian.md --- From 802a81506fb4a698b37798b49438eca6fa67f203 Mon Sep 17 00:00:00 2001 From: EilidhRoss1 <98904290+EilidhRoss1@users.noreply.github.com> Date: Mon, 20 Jun 2022 10:02:35 +0100 Subject: [PATCH 13/14] podcast link fix --- notes/in-conversation-with-klimadao-part-one.md | 1 + 1 file changed, 1 insertion(+) diff --git a/notes/in-conversation-with-klimadao-part-one.md b/notes/in-conversation-with-klimadao-part-one.md index b9289e0..7671bbc 100644 --- a/notes/in-conversation-with-klimadao-part-one.md +++ b/notes/in-conversation-with-klimadao-part-one.md @@ -5,6 +5,7 @@ created: 2022-05-18 description: "In a previous episode, Collective Action Problems & Climate Change, Steven Diehl and Rufus Pollock discussed the utility of web3 in tackling collective action problems and climate change, using KlimaDAO as a case study. In a follow up to this conversation, Rufus and Theo from Life Itself Labs sat down with Marcus Aurelius and 0xy moron, two core members of KlimaDAO, to discuss the KlimaDAO model, its inspirations and its aims." image: /img/klima-one-thumbnail.png youtube: https://youtu.be/fHHxQAQW0co +podcast: https://anchor.fm/life-itself/episodes/KlimaDAO--Life-Itself-In-Conversation-Part-One-e1ilbra/a-a7gpq18 featured: true aliases: notes/in-conversation-with-klimadao-part-one.md --- From 085d1c790cee2baa74eda9215716bf22987ac51c Mon Sep 17 00:00:00 2001 From: EilidhRoss1 <98904290+EilidhRoss1@users.noreply.github.com> Date: Mon, 20 Jun 2022 10:03:36 +0100 Subject: [PATCH 14/14] podcast link fix --- notes/pia-mancini-open-collective-dialogue.md | 1 + 1 file changed, 1 insertion(+) diff --git a/notes/pia-mancini-open-collective-dialogue.md b/notes/pia-mancini-open-collective-dialogue.md index cc9d337..9d90164 100644 --- a/notes/pia-mancini-open-collective-dialogue.md +++ b/notes/pia-mancini-open-collective-dialogue.md @@ -5,6 +5,7 @@ date: 2022-04-08 description: 'In this episode with Pia Mancini about her work to make community finance transparent and sustainable with Open Collective, her commitment ot steward ownership and the value of an exit to community.' image: /img/Pia Mancini Thumbnail.jpg youtube: https://www.youtube.com/watch?v=C2KYJiQVtIM +podcast: https://anchor.fm/life-itself/episodes/Open-Collective--Steward-Ownership--Exit-to-Community-with-Pia-Mancini-e1hkltv/a-a7gpq18 featured: true aliases: notes/pia-mancini-open-collective-dialogue.md ---