Skip to content

Commit

Permalink
feat: migrate to next 15 + contentlayer2
Browse files Browse the repository at this point in the history
  • Loading branch information
zpuckeridge committed Nov 29, 2024
1 parent da0fff1 commit 63def6f
Show file tree
Hide file tree
Showing 14 changed files with 107 additions and 69 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ✍️ Blog

Built with Next.js, PagesCMS, Tailwind, shadcn, Prisma, Framer Motion, Mux and Vidstack.
Built with Next.js, PagesCMS, Tailwind, shadcn, Prisma, Framer Motion, Mux.

## 🚀 Install

Expand Down
3 changes: 3 additions & 0 deletions _content/homosexuality-what-does-the-bible-say.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ If our identity is in that of the world and not of Christ, we are nothing but an
The Bible is very clear on its stance of homosexual behaviour. I simply cannot find an honest interpretation (and not for lack of trying) that affirms homosexual behaviour in any form. Personally, I have really struggled with homosexuality in my personal life, and it is not a light topic for me to talk about, but I felt it prudent to record my thoughts and research in this article. I pray that others might find this useful in their own walks.

[^1]: Simon LeVay, "A Difference in Hypothalmic Structure Between Heterosexual and Homosexual Men" Science 258 (Aug. 30, 1991)

[^2]: J.M Bailey and Richard Pillard, "A Genetic Study of Male Sexual Orientation" Archives of General Psychiatry 48 (1991)

[^3]: W. Byne and B. Parsons, “Human Sexual Orientation: The Biologic Theories Reappraised,” Archives of General Psychiatry 50 (March 1993): 228.

[^4]: Thomas E. Schmidt, Straight and Narrow, 134.
2 changes: 2 additions & 0 deletions _content/is-gods-love-reckless.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,7 @@ Ultimately, we as Christians should avoid songs that divide people or force peop
God's love is the very antithesis of recklessness. God's love can not be seen as reckless in any way because doing so frames God's love as impulsive and inconsiderate versus the steady, all knowing, perfect love that is evident in scripture and is poured out for us everyday.

[^1]: reckless: utterly unconcerned about the consequences of some action; without caution; careless. — https://www.dictionary.com/browse/reckless

[^2]: Psalm 139:4

[^3]: 2 Timothy 2:16
8 changes: 8 additions & 0 deletions _content/is-suicide-sinful.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,19 @@ Works performed outside of God are sin. If you believe this to be true, the deat
Please note that by writing this I am not saying that all people who commit suicide aren't saved. God is ultimately the judge and He will judge each person accordingly.

[^1]: Mark 5:2-5, Ephesians 5:29

[^2]: 1 Corinthians 6:9-10

[^3]: Revelation 21:8

[^4]: Judges 9:50-57

[^5]: Judges 16:28-30

[^6]: 1 Samuel 31:1-6; 2 Samuel 1:1-15; 1 Chronicles 10:1-13

[^7]: 2 Samuel 17:23

[^8]: 1 Kings 16:18-19

[^9]: Matthew 27:5; Acts 1:18-20
35 changes: 35 additions & 0 deletions _content/the-limitations-of-natural-revelation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,38 +75,73 @@ In embracing the gospel, we find not only forgiveness for our sins but also a tr
While natural revelation serves as a compelling witness to God's existence and moral standards, it functions more as a precursor, preparing hearts to receive the fullness of salvation in Christ. Our marvel at the wonders of creation should, therefore, propel us toward a deeper exploration of the redemptive narrative found in scripture. Our unwavering hope rests not in the captivating beauty of the natural world but in the unmerited grace and love extended to us through the person of Jesus Christ, the cornerstone of our faith and the pathway to eternal life.

[^1]: Job 11:7

[^2]: Romans 11:33-34

[^3]: "The Limits of Natural Revelation" (Article, Ligonier Ministries, Ligonier)

[^4]: Robert Gonzales, "The Necessity of Scripture: General Revelation Is Not Enough" (Article, July 3, 2018)

[^5]: Genesis 1:1, John 1:3, Colossians 1:15

[^6]: Psalms 104, Acts 14:14-17, Hebrews 1:3

[^7]: Psalm 19:1

[^8]: Robert Gonzales, "The Necessity of Scripture: General Revelation Is Not Enough" (Article, July 3, 2018)

[^9]: Robert Gonzales, "The Necessity of Scripture: General Revelation Is Not Enough" (Article, July 3, 2018)

[^10]: Matthew Henry associates the "light of nature" with the human conscience in his exposition of Romans 2:12-16. A Commentary on the Whole Bible, vol. 6 (New Jersey: Fleming H. Revell Company, n.d.), 374-77.

[^11]: Romans 1:20

[^12]: Acts 14:17

[^13]: Psalm 104

[^14]: Psalm 19:1

[^15]: Romans 1:18; 2:1-16

[^16]: Romans 1:18-32

[^17]: Craig Ireland, "Worldview for theology or theology for worldview?" (Lecture, Haddon Institute, Australia, December 4, 2023) theology-for-worldview Craig Ireland, "Where do we find ourselves?" (Lecture, Haddon Institute, Australia, December 11, 2023) where-do-we-find-ourselves

[^18]: Genesis 1:26-27

[^19]: Neal Hardin, "The Limitations of Knowing God Using Natural Theology" (Article, January 31, 2017)

[^20]: Romans 1

[^21]: Genesis 6:5

[^22]: Romans 8:7

[^23]: 2 Corinthians 4:4

[^24]: Colossians 1:21

[^25]: "The Limits of Natural Revelation" (Article, Ligonier Ministries, Ligonier)

[^26]: Romans 1:18-32

[^27]: London Baptist Confession of Faith (10.4)

[^28]: John Calvin, "COMMENTARIES ON THE FIRST BOOK OF MOSES CALLED GENESIS" (Commentary, Chapter 3.17)

[^29]: Westminster Confession of Faith, (I.1)

[^30]: Keith Mathison, "General and Special Revelation" (Article, Ligonier Ministries, Ligonier)

[^31]: 1 Peter 1:23

[^32]: 1 Corinthians 2:14

[^33]: Calvin's 1538 Catechism, Art 2

[^34]: Colossians 3:10

[^35]: John Hartley "Natural Revelation: Is Natural Theology Reliable?" (Article, October 1, 2018)

[^36]: Romans 1 – 3
11 changes: 11 additions & 0 deletions _content/the-propitiation-of-jesus-is-not-paganism.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,25 @@ Paganism is also differentiated in that the pagan gods are unpredictable. On the
</SideNote>

[^1]: Romans 6:23

[^2]: Romans 5:1-21

[^3]: John 3:16

[^4]: John 1:14

[^5]: Matthew 1:23, Luke 1:27 & 34

[^6]: Hebrews 2:17

[^7]: 1 John 4:10

[^8]: Luke 22:42-44, Psalms 75:8, Revelation 14:10

[^9]: Romans 7:7-25

[^10]: Hebrews 10:5-7

[^11]: John 10:17-18

[^12]: Deuteronomy 12:31
8 changes: 2 additions & 6 deletions app/colophon/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,10 @@ export default function Colophon() {
,{" "}
<LinkWithIcon href="https://www.framer.com/motion?ref=zacchary.me">
Framer Motion
</LinkWithIcon>
,{" "}
<LinkWithIcon href="https://www.mux.com?ref=zacchary.me">
Mux
</LinkWithIcon>{" "}
and{" "}
<LinkWithIcon href="https://vidstack.io?ref=zacchary.me">
Vidstack
<LinkWithIcon href="https://www.mux.com?ref=zacchary.me">
Mux
</LinkWithIcon>
.
</p>
Expand Down
16 changes: 9 additions & 7 deletions app/timeline/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
import { allPosts } from "contentlayer/generated";
import type { MDXComponents } from "mdx/types";
import { Metadata } from "next";
import { getMDXComponent } from "next-contentlayer/hooks";
import { getMDXComponent } from "next-contentlayer2/hooks";
import Image from "next/image";
import Link from "next/link";
import { notFound } from "next/navigation";
Expand Down Expand Up @@ -93,7 +93,10 @@ export async function generateStaticParams() {
}));
}

export default async function Post({ params }: { params: { slug: string } }) {
export default async function Post(props: {
params: Promise<{ slug: string }>;
}) {
const params = await props.params;
const { slug } = params;

if (!slug) {
Expand Down Expand Up @@ -282,11 +285,10 @@ export default async function Post({ params }: { params: { slug: string } }) {
);
}

export function generateMetadata({
params,
}: {
params: { slug: string };
}): Metadata {
export async function generateMetadata(props: {
params: Promise<{ slug: string }>;
}): Promise<Metadata> {
const params = await props.params;
const post = allPosts.find(
(post: { _raw: { flattenedPath: string } }) =>
post._raw.flattenedPath === params.slug,
Expand Down
14 changes: 8 additions & 6 deletions app/video/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ export async function generateStaticParams() {
}));
}

export default async function Clip({ params }: { params: { slug: string } }) {
export default async function Clip(props: {
params: Promise<{ slug: string }>;
}) {
const params = await props.params;
const { slug } = params;

if (!slug) {
Expand Down Expand Up @@ -76,11 +79,10 @@ export default async function Clip({ params }: { params: { slug: string } }) {
);
}

export function generateMetadata({
params,
}: {
params: { slug: string };
}): Metadata {
export async function generateMetadata(props: {
params: Promise<{ slug: string }>;
}): Promise<Metadata> {
const params = await props.params;
const video = allVideos.find(
(video: { _raw: { flattenedPath: string } }) =>
video._raw.flattenedPath === params.slug,
Expand Down
Binary file modified bun.lockb
Binary file not shown.
19 changes: 2 additions & 17 deletions components/player.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
import "@vidstack/react/player/styles/default/layouts/video.css";
import "@vidstack/react/player/styles/default/theme.css";

import { MediaPlayer, MediaProvider } from "@vidstack/react";
import {
defaultLayoutIcons,
DefaultVideoLayout,
} from "@vidstack/react/player/layouts/default";
import MuxPlayer from "@mux/mux-player-react";

export default function Player({ src }: { src: any }) {
return (
<MediaPlayer
src={`https://stream.mux.com/${src}.m3u8`}
className="rounded-none"
>
<MediaProvider />
<DefaultVideoLayout noScrubGesture icons={defaultLayoutIcons} />
</MediaPlayer>
);
return <MuxPlayer playbackId={src} accentColor="#2563eb" />;
}
2 changes: 1 addition & 1 deletion contentlayer.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineDocumentType, makeSource } from "contentlayer/source-files";
import { defineDocumentType, makeSource } from "contentlayer2/source-files";
import remarkGfm from "remark-gfm";

export const Post = defineDocumentType(() => ({
Expand Down
5 changes: 2 additions & 3 deletions next.config.js → next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
const { withContentlayer } = require("next-contentlayer");
import { withContentlayer } from "next-contentlayer2";

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
images: {
remotePatterns: [
{
Expand All @@ -30,4 +29,4 @@ const nextConfig = {
},
};

module.exports = withContentlayer(nextConfig);
export default withContentlayer(nextConfig);
51 changes: 23 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,58 +10,53 @@
},
"dependencies": {
"@emotion/is-prop-valid": "^1.3.1",
"@mux/mux-player-react": "^3.1.0",
"@radix-ui/react-accordion": "^1.2.1",
"@radix-ui/react-dropdown-menu": "^2.1.2",
"@radix-ui/react-hover-card": "^1.1.2",
"@radix-ui/react-icons": "^1.3.1",
"@radix-ui/react-icons": "^1.3.2",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-popover": "^1.1.2",
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-toast": "^1.2.2",
"@radix-ui/react-tooltip": "^1.1.3",
"@radix-ui/react-tooltip": "^1.1.4",
"@tailwindcss/typography": "^0.5.15",
"@types/canvas-confetti": "^1.6.4",
"@vidstack/react": "^1.12.12",
"canvas-confetti": "^1.9.3",
"class-variance-authority": "^0.7.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"contentlayer": "^0.3.4",
"contentlayer2": "^0.5.3",
"date-fns": "^4.1.0",
"embla-carousel-autoplay": "^8.3.1",
"embla-carousel-react": "^8.3.1",
"framer-motion": "^11.11.10",
"fs-extra": "^11.2.0",
"embla-carousel-autoplay": "^8.5.1",
"embla-carousel-react": "^8.5.1",
"framer-motion": "^11.12.0",
"geist": "^1.3.1",
"gray-matter": "^4.0.3",
"hls.js": "^1.5.17",
"lucide-react": "^0.446.0",
"lucide-react": "^0.462.0",
"mini-svg-data-uri": "^1.4.4",
"next": "14.2.3",
"next-contentlayer": "^0.3.4",
"next": "^15.0.3",
"next-contentlayer2": "^0.5.3",
"next-mdx-remote": "^5.0.0",
"next-themes": "^0.3.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"next-themes": "^0.4.3",
"react": "^19.0.0-rc.1",
"react-dom": "^19.0.0-rc.1",
"react-icons": "^5.3.0",
"remark-gfm": "^4.0.0",
"remark-toc": "^9.0.0",
"tailwind-merge": "^2.5.4",
"tailwind-merge": "^2.5.5",
"tailwindcss-animate": "^1.0.7",
"use-lanyard": "^1.5.2",
"vaul": "^0.9.9"
"vaul": "^1.1.1"
},
"devDependencies": {
"@types/node": "^20.17.4",
"@types/node": "^22.10.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"autoprefixer": "^10.4.20",
"eslint": "^9.13.0",
"eslint-config-next": "14.2.3",
"postcss": "^8.4.47",
"prettier": "3.2.5",
"tailwindcss": "^3.4.14",
"typescript": "^5.6.3"
"eslint": "^9.15.0",
"eslint-config-next": "15.0.3",
"postcss": "^8.4.49",
"prettier": "3.4.1",
"tailwindcss": "^3.4.15",
"typescript": "^5.7.2"
},
"trustedDependencies": [
"protobufjs"
Expand Down

0 comments on commit 63def6f

Please sign in to comment.